#import "full.h"
#ifndef DEF_FULLNS0OpenDoveGWSession_M
#define DEF_FULLNS0OpenDoveGWSession_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveGWSession

/**
 * (no documentation provided)
 */
- (NSString *) action
{
  return _action;
}

/**
 * (no documentation provided)
 */
- (void) setAction: (NSString *) newAction
{
  [newAction retain];
  [_action release];
  _action = newAction;
}

/**
 * (no documentation provided)
 */
- (int *) destinationPort
{
  return _destinationPort;
}

/**
 * (no documentation provided)
 */
- (void) setDestinationPort: (int *) newDestinationPort
{
  if (_destinationPort != NULL) {
    free(_destinationPort);
  }
  _destinationPort = newDestinationPort;
}

/**
 * (no documentation provided)
 */
- (NSString *) sourceIP
{
  return _sourceIP;
}

/**
 * (no documentation provided)
 */
- (void) setSourceIP: (NSString *) newSourceIP
{
  [newSourceIP retain];
  [_sourceIP release];
  _sourceIP = newSourceIP;
}

/**
 * (no documentation provided)
 */
- (int *) protocol
{
  return _protocol;
}

/**
 * (no documentation provided)
 */
- (void) setProtocol: (int *) newProtocol
{
  if (_protocol != NULL) {
    free(_protocol);
  }
  _protocol = newProtocol;
}

/**
 * (no documentation provided)
 */
- (int *) sNATPort
{
  return _sNATPort;
}

/**
 * (no documentation provided)
 */
- (void) setSNATPort: (int *) newSNATPort
{
  if (_sNATPort != NULL) {
    free(_sNATPort);
  }
  _sNATPort = newSNATPort;
}

/**
 * (no documentation provided)
 */
- (NSString *) originalSourceIP
{
  return _originalSourceIP;
}

/**
 * (no documentation provided)
 */
- (void) setOriginalSourceIP: (NSString *) newOriginalSourceIP
{
  [newOriginalSourceIP retain];
  [_originalSourceIP release];
  _originalSourceIP = newOriginalSourceIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) overlayDestinationIP
{
  return _overlayDestinationIP;
}

/**
 * (no documentation provided)
 */
- (void) setOverlayDestinationIP: (NSString *) newOverlayDestinationIP
{
  [newOverlayDestinationIP retain];
  [_overlayDestinationIP release];
  _overlayDestinationIP = newOverlayDestinationIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) vnid
{
  return _vnid;
}

/**
 * (no documentation provided)
 */
- (void) setVnid: (NSString *) newVnid
{
  [newVnid retain];
  [_vnid release];
  _vnid = newVnid;
}

/**
 * (no documentation provided)
 */
- (int *) originalSourcePort
{
  return _originalSourcePort;
}

/**
 * (no documentation provided)
 */
- (void) setOriginalSourcePort: (int *) newOriginalSourcePort
{
  if (_originalSourcePort != NULL) {
    free(_originalSourcePort);
  }
  _originalSourcePort = newOriginalSourcePort;
}

/**
 * (no documentation provided)
 */
- (NSString *) age
{
  return _age;
}

/**
 * (no documentation provided)
 */
- (void) setAge: (NSString *) newAge
{
  [newAge retain];
  [_age release];
  _age = newAge;
}

/**
 * (no documentation provided)
 */
- (int *) originalDestinationPort
{
  return _originalDestinationPort;
}

/**
 * (no documentation provided)
 */
- (void) setOriginalDestinationPort: (int *) newOriginalDestinationPort
{
  if (_originalDestinationPort != NULL) {
    free(_originalDestinationPort);
  }
  _originalDestinationPort = newOriginalDestinationPort;
}

/**
 * (no documentation provided)
 */
- (NSString *) destinationIP
{
  return _destinationIP;
}

/**
 * (no documentation provided)
 */
- (void) setDestinationIP: (NSString *) newDestinationIP
{
  [newDestinationIP retain];
  [_destinationIP release];
  _destinationIP = newDestinationIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) overlaySourceIP
{
  return _overlaySourceIP;
}

/**
 * (no documentation provided)
 */
- (void) setOverlaySourceIP: (NSString *) newOverlaySourceIP
{
  [newOverlaySourceIP retain];
  [_overlaySourceIP release];
  _overlaySourceIP = newOverlaySourceIP;
}

/**
 * (no documentation provided)
 */
- (int *) sourcePort
{
  return _sourcePort;
}

/**
 * (no documentation provided)
 */
- (void) setSourcePort: (int *) newSourcePort
{
  if (_sourcePort != NULL) {
    free(_sourcePort);
  }
  _sourcePort = newSourcePort;
}

/**
 * (no documentation provided)
 */
- (int *) overlayDestinationPort
{
  return _overlayDestinationPort;
}

/**
 * (no documentation provided)
 */
- (void) setOverlayDestinationPort: (int *) newOverlayDestinationPort
{
  if (_overlayDestinationPort != NULL) {
    free(_overlayDestinationPort);
  }
  _overlayDestinationPort = newOverlayDestinationPort;
}

/**
 * (no documentation provided)
 */
- (NSString *) sNATIP
{
  return _sNATIP;
}

/**
 * (no documentation provided)
 */
- (void) setSNATIP: (NSString *) newSNATIP
{
  [newSNATIP retain];
  [_sNATIP release];
  _sNATIP = newSNATIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) originalDestinationIP
{
  return _originalDestinationIP;
}

/**
 * (no documentation provided)
 */
- (void) setOriginalDestinationIP: (NSString *) newOriginalDestinationIP
{
  [newOriginalDestinationIP retain];
  [_originalDestinationIP release];
  _originalDestinationIP = newOriginalDestinationIP;
}

/**
 * (no documentation provided)
 */
- (int *) overlaySourcePort
{
  return _overlaySourcePort;
}

/**
 * (no documentation provided)
 */
- (void) setOverlaySourcePort: (int *) newOverlaySourcePort
{
  if (_overlaySourcePort != NULL) {
    free(_overlaySourcePort);
  }
  _overlaySourcePort = newOverlaySourcePort;
}

- (void) dealloc
{
  [self setAction: nil];
  [self setDestinationPort: NULL];
  [self setSourceIP: nil];
  [self setProtocol: NULL];
  [self setSNATPort: NULL];
  [self setOriginalSourceIP: nil];
  [self setOverlayDestinationIP: nil];
  [self setVnid: nil];
  [self setOriginalSourcePort: NULL];
  [self setAge: nil];
  [self setOriginalDestinationPort: NULL];
  [self setDestinationIP: nil];
  [self setOverlaySourceIP: nil];
  [self setSourcePort: NULL];
  [self setOverlayDestinationPort: NULL];
  [self setSNATIP: nil];
  [self setOriginalDestinationIP: nil];
  [self setOverlaySourcePort: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveGWSession *_fULLNS0OpenDoveGWSession;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveGWSession = (FULLNS0OpenDoveGWSession *) [FULLNS0OpenDoveGWSession readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveGWSession;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveGWSession */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveGWSession (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveGWSession (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveGWSession (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveGWSession from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveGWSession defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveGWSession *_fULLNS0OpenDoveGWSession = [[FULLNS0OpenDoveGWSession alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveGWSession initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveGWSession = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveGWSession autorelease];
  return _fULLNS0OpenDoveGWSession;
}

/**
 * Initialize this instance of FULLNS0OpenDoveGWSession according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveGWSession to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveGWSession from an XML reader. The element to be read is
 * "openDoveGWSession".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveGWSession.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveGWSession *_openDoveGWSession = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveGWSession."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveGWSession", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveGWSession.");
#endif
    _openDoveGWSession = (FULLNS0OpenDoveGWSession *)[FULLNS0OpenDoveGWSession readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveGWSession.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWSession. Expected element openDoveGWSession. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWSession. Expected element openDoveGWSession. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveGWSession;
}

/**
 * Writes this FULLNS0OpenDoveGWSession to XML under element name "openDoveGWSession".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveGWSession to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveGWSession", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveGWSession. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveGWSession for root element {}openDoveGWSession...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveGWSession for root element {}openDoveGWSession...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveGWSession. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "action", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}action of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}action of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAction: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDestinationPort: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "sip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSourceIP: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "proto", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setProtocol: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "snat_sport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setSNATPort: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "orig_sip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}orig_sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}orig_sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOriginalSourceIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ovl_dip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}ovl_dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOverlayDestinationIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "net_id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}net_id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}net_id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVnid: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "orig_sport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setOriginalSourcePort: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "age", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}age of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}age of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAge: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "orig_dport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setOriginalDestinationPort: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setDestinationIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ovl_sip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}ovl_sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_sip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOverlaySourceIP: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "sport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setSourcePort: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ovl_dport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setOverlayDestinationPort: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "snat_ip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}snat_ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}snat_ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSNATIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "orig_dip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}orig_dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}orig_dip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOriginalDestinationIP: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ovl_sport", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setOverlaySourcePort: ((int*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self action]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "action", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}action."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}action...");
#endif
    [[self action] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}action...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}action."];
    }
  }
  if ([self destinationPort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self destinationPort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dport."];
    }
  }
  if ([self sourceIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}sip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}sip...");
#endif
    [[self sourceIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}sip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}sip."];
    }
  }
  if ([self protocol] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "proto", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}proto."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}proto...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self protocol]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}proto...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}proto."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}proto."];
    }
  }
  if ([self sNATPort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_sport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}snat_sport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}snat_sport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self sNATPort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}snat_sport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}snat_sport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}snat_sport."];
    }
  }
  if ([self originalSourceIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_sip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}orig_sip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}orig_sip...");
#endif
    [[self originalSourceIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}orig_sip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}orig_sip."];
    }
  }
  if ([self overlayDestinationIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_dip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_dip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_dip...");
#endif
    [[self overlayDestinationIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_dip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_dip."];
    }
  }
  if ([self vnid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}net_id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}net_id...");
#endif
    [[self vnid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}net_id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}net_id."];
    }
  }
  if ([self originalSourcePort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_sport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}orig_sport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}orig_sport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self originalSourcePort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}orig_sport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}orig_sport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}orig_sport."];
    }
  }
  if ([self age]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "age", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}age."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}age...");
#endif
    [[self age] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}age...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}age."];
    }
  }
  if ([self originalDestinationPort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_dport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}orig_dport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}orig_dport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self originalDestinationPort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}orig_dport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}orig_dport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}orig_dport."];
    }
  }
  if ([self destinationIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dip...");
#endif
    [[self destinationIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dip."];
    }
  }
  if ([self overlaySourceIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_sip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_sip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_sip...");
#endif
    [[self overlaySourceIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_sip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_sip."];
    }
  }
  if ([self sourcePort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}sport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}sport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self sourcePort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}sport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}sport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}sport."];
    }
  }
  if ([self overlayDestinationPort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_dport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_dport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_dport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self overlayDestinationPort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_dport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}ovl_dport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_dport."];
    }
  }
  if ([self sNATIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_ip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}snat_ip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}snat_ip...");
#endif
    [[self sNATIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}snat_ip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}snat_ip."];
    }
  }
  if ([self originalDestinationIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_dip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}orig_dip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}orig_dip...");
#endif
    [[self originalDestinationIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}orig_dip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}orig_dip."];
    }
  }
  if ([self overlaySourcePort] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_sport", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_sport."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_sport...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self overlaySourcePort]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_sport...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}ovl_sport."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_sport."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveGWSession (JAXB) */

#endif /* DEF_FULLNS0OpenDoveGWSession_M */
#ifndef DEF_FULLNS0OpenDoveNVP_M
#define DEF_FULLNS0OpenDoveNVP_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveNVP

/**
 * (no documentation provided)
 */
- (NSString *) name
{
  return _name;
}

/**
 * (no documentation provided)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * (no documentation provided)
 */
- (NSString *) value
{
  return _value;
}

/**
 * (no documentation provided)
 */
- (void) setValue: (NSString *) newValue
{
  [newValue retain];
  [_value release];
  _value = newValue;
}

- (void) dealloc
{
  [self setName: nil];
  [self setValue: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveNVP *_fULLNS0OpenDoveNVP;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveNVP = (FULLNS0OpenDoveNVP *) [FULLNS0OpenDoveNVP readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveNVP;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveNVP */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveNVP (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveNVP (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveNVP (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveNVP from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveNVP defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveNVP *_fULLNS0OpenDoveNVP = [[FULLNS0OpenDoveNVP alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveNVP initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveNVP = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveNVP autorelease];
  return _fULLNS0OpenDoveNVP;
}

/**
 * Initialize this instance of FULLNS0OpenDoveNVP according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveNVP to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveNVP from an XML reader. The element to be read is
 * "openDoveNVP".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveNVP.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveNVP *_openDoveNVP = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveNVP."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveNVP", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveNVP.");
#endif
    _openDoveNVP = (FULLNS0OpenDoveNVP *)[FULLNS0OpenDoveNVP readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveNVP.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNVP. Expected element openDoveNVP. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNVP. Expected element openDoveNVP. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveNVP;
}

/**
 * Writes this FULLNS0OpenDoveNVP to XML under element name "openDoveNVP".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveNVP to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNVP", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveNVP. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveNVP for root element {}openDoveNVP...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveNVP for root element {}openDoveNVP...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveNVP. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "Name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}Name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}Name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setName: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "Value", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}Value of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}Value of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setValue: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self name]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "Name", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}Name."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}Name...");
#endif
    [[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}Name...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}Name."];
    }
  }
  if ([self value]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "Value", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}Value."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}Value...");
#endif
    [[self value] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}Value...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}Value."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveNVP (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNVP_M */
#ifndef DEF_FULLNS0OpenDoveNeutronControlBlock_M
#define DEF_FULLNS0OpenDoveNeutronControlBlock_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveNeutronControlBlock

/**
 * (no documentation provided)
 */
- (BOOL *) domainSeparation
{
  return _domainSeparation;
}

/**
 * (no documentation provided)
 */
- (void) setDomainSeparation: (BOOL *) newDomainSeparation
{
  if (_domainSeparation != NULL) {
    free(_domainSeparation);
  }
  _domainSeparation = newDomainSeparation;
}

/**
 * (no documentation provided)
 */
- (int *) egwReplicationFactor
{
  return _egwReplicationFactor;
}

/**
 * (no documentation provided)
 */
- (void) setEgwReplicationFactor: (int *) newEgwReplicationFactor
{
  if (_egwReplicationFactor != NULL) {
    free(_egwReplicationFactor);
  }
  _egwReplicationFactor = newEgwReplicationFactor;
}

/**
 * (no documentation provided)
 */
- (int *) snatPoolSize
{
  return _snatPoolSize;
}

/**
 * (no documentation provided)
 */
- (void) setSnatPoolSize: (int *) newSnatPoolSize
{
  if (_snatPoolSize != NULL) {
    free(_snatPoolSize);
  }
  _snatPoolSize = newSnatPoolSize;
}

- (void) dealloc
{
  [self setDomainSeparation: NULL];
  [self setEgwReplicationFactor: NULL];
  [self setSnatPoolSize: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveNeutronControlBlock *_fULLNS0OpenDoveNeutronControlBlock;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveNeutronControlBlock = (FULLNS0OpenDoveNeutronControlBlock *) [FULLNS0OpenDoveNeutronControlBlock readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveNeutronControlBlock;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveNeutronControlBlock */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveNeutronControlBlock (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveNeutronControlBlock (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveNeutronControlBlock (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveNeutronControlBlock from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveNeutronControlBlock defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveNeutronControlBlock *_fULLNS0OpenDoveNeutronControlBlock = [[FULLNS0OpenDoveNeutronControlBlock alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveNeutronControlBlock initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveNeutronControlBlock = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveNeutronControlBlock autorelease];
  return _fULLNS0OpenDoveNeutronControlBlock;
}

/**
 * Initialize this instance of FULLNS0OpenDoveNeutronControlBlock according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveNeutronControlBlock to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveNeutronControlBlock from an XML reader. The element to be read is
 * "openDoveNeutronControlBlock".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveNeutronControlBlock.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveNeutronControlBlock *_openDoveNeutronControlBlock = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveNeutronControlBlock."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveNeutronControlBlock", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveNeutronControlBlock.");
#endif
    _openDoveNeutronControlBlock = (FULLNS0OpenDoveNeutronControlBlock *)[FULLNS0OpenDoveNeutronControlBlock readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveNeutronControlBlock.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNeutronControlBlock. Expected element openDoveNeutronControlBlock. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNeutronControlBlock. Expected element openDoveNeutronControlBlock. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveNeutronControlBlock;
}

/**
 * Writes this FULLNS0OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveNeutronControlBlock to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNeutronControlBlock", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveNeutronControlBlock. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveNeutronControlBlock for root element {}openDoveNeutronControlBlock...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveNeutronControlBlock for root element {}openDoveNeutronControlBlock...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveNeutronControlBlock. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "domain_separation", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDomainSeparation: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "egw_replication_factor", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setEgwReplicationFactor: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "snat_pool_size", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setSnatPoolSize: ((int*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self domainSeparation] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_separation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}domain_separation."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}domain_separation...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self domainSeparation]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}domain_separation...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}domain_separation."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}domain_separation."];
    }
  }
  if ([self egwReplicationFactor] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "egw_replication_factor", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}egw_replication_factor."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}egw_replication_factor...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self egwReplicationFactor]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}egw_replication_factor...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}egw_replication_factor."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}egw_replication_factor."];
    }
  }
  if ([self snatPoolSize] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_pool_size", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}snat_pool_size."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}snat_pool_size...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self snatPoolSize]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}snat_pool_size...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}snat_pool_size."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}snat_pool_size."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveNeutronControlBlock (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNeutronControlBlock_M */
#ifndef DEF_FULLNS0OpenDoveServiceAppliance_M
#define DEF_FULLNS0OpenDoveServiceAppliance_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveServiceAppliance

/**
 * (no documentation provided)
 */
- (int *) ip_family
{
  return _ip_family;
}

/**
 * (no documentation provided)
 */
- (void) setIp_family: (int *) newIp_family
{
  if (_ip_family != NULL) {
    free(_ip_family);
  }
  _ip_family = newIp_family;
}

/**
 * (no documentation provided)
 */
- (NSString *) build_version
{
  return _build_version;
}

/**
 * (no documentation provided)
 */
- (void) setBuild_version: (NSString *) newBuild_version
{
  [newBuild_version retain];
  [_build_version release];
  _build_version = newBuild_version;
}

/**
 * (no documentation provided)
 */
- (BOOL *) canBeDGW
{
  return _canBeDGW;
}

/**
 * (no documentation provided)
 */
- (void) setCanBeDGW: (BOOL *) newCanBeDGW
{
  if (_canBeDGW != NULL) {
    free(_canBeDGW);
  }
  _canBeDGW = newCanBeDGW;
}

/**
 * (no documentation provided)
 */
- (NSString *) ip
{
  return _ip;
}

/**
 * (no documentation provided)
 */
- (void) setIp: (NSString *) newIp
{
  [newIp retain];
  [_ip release];
  _ip = newIp;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

/**
 * (no documentation provided)
 */
- (BOOL *) canBeDCS
{
  return _canBeDCS;
}

/**
 * (no documentation provided)
 */
- (void) setCanBeDCS: (BOOL *) newCanBeDCS
{
  if (_canBeDCS != NULL) {
    free(_canBeDCS);
  }
  _canBeDCS = newCanBeDCS;
}

/**
 * (no documentation provided)
 */
- (int *) dcs_raw_service_port
{
  return _dcs_raw_service_port;
}

/**
 * (no documentation provided)
 */
- (void) setDcs_raw_service_port: (int *) newDcs_raw_service_port
{
  if (_dcs_raw_service_port != NULL) {
    free(_dcs_raw_service_port);
  }
  _dcs_raw_service_port = newDcs_raw_service_port;
}

/**
 * (no documentation provided)
 */
- (NSString *) timestamp
{
  return _timestamp;
}

/**
 * (no documentation provided)
 */
- (void) setTimestamp: (NSString *) newTimestamp
{
  [newTimestamp retain];
  [_timestamp release];
  _timestamp = newTimestamp;
}

/**
 * (no documentation provided)
 */
- (BOOL *) isDGW
{
  return _isDGW;
}

/**
 * (no documentation provided)
 */
- (void) setIsDGW: (BOOL *) newIsDGW
{
  if (_isDGW != NULL) {
    free(_isDGW);
  }
  _isDGW = newIsDGW;
}

/**
 * (no documentation provided)
 */
- (int *) dcs_rest_service_port
{
  return _dcs_rest_service_port;
}

/**
 * (no documentation provided)
 */
- (void) setDcs_rest_service_port: (int *) newDcs_rest_service_port
{
  if (_dcs_rest_service_port != NULL) {
    free(_dcs_rest_service_port);
  }
  _dcs_rest_service_port = newDcs_rest_service_port;
}

/**
 * (no documentation provided)
 */
- (BOOL *) isDCS
{
  return _isDCS;
}

/**
 * (no documentation provided)
 */
- (void) setIsDCS: (BOOL *) newIsDCS
{
  if (_isDCS != NULL) {
    free(_isDCS);
  }
  _isDCS = newIsDCS;
}

/**
 * (no documentation provided)
 */
- (int *) dgw_config_version
{
  return _dgw_config_version;
}

/**
 * (no documentation provided)
 */
- (void) setDgw_config_version: (int *) newDgw_config_version
{
  if (_dgw_config_version != NULL) {
    free(_dgw_config_version);
  }
  _dgw_config_version = newDgw_config_version;
}

/**
 * (no documentation provided)
 */
- (int *) dcs_config_version
{
  return _dcs_config_version;
}

/**
 * (no documentation provided)
 */
- (void) setDcs_config_version: (int *) newDcs_config_version
{
  if (_dcs_config_version != NULL) {
    free(_dcs_config_version);
  }
  _dcs_config_version = newDcs_config_version;
}

/**
 * (no documentation provided)
 */
- (int *) dgw_rest_service_port
{
  return _dgw_rest_service_port;
}

/**
 * (no documentation provided)
 */
- (void) setDgw_rest_service_port: (int *) newDgw_rest_service_port
{
  if (_dgw_rest_service_port != NULL) {
    free(_dgw_rest_service_port);
  }
  _dgw_rest_service_port = newDgw_rest_service_port;
}

- (void) dealloc
{
  [self setIp_family: NULL];
  [self setBuild_version: nil];
  [self setCanBeDGW: NULL];
  [self setIp: nil];
  [self setUuid: nil];
  [self setCanBeDCS: NULL];
  [self setDcs_raw_service_port: NULL];
  [self setTimestamp: nil];
  [self setIsDGW: NULL];
  [self setDcs_rest_service_port: NULL];
  [self setIsDCS: NULL];
  [self setDgw_config_version: NULL];
  [self setDcs_config_version: NULL];
  [self setDgw_rest_service_port: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveServiceAppliance *_fULLNS0OpenDoveServiceAppliance;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveServiceAppliance = (FULLNS0OpenDoveServiceAppliance *) [FULLNS0OpenDoveServiceAppliance readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveServiceAppliance;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveServiceAppliance */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveServiceAppliance (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveServiceAppliance (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveServiceAppliance (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveServiceAppliance from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveServiceAppliance defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveServiceAppliance *_fULLNS0OpenDoveServiceAppliance = [[FULLNS0OpenDoveServiceAppliance alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveServiceAppliance initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveServiceAppliance = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveServiceAppliance autorelease];
  return _fULLNS0OpenDoveServiceAppliance;
}

/**
 * Initialize this instance of FULLNS0OpenDoveServiceAppliance according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveServiceAppliance to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveServiceAppliance from an XML reader. The element to be read is
 * "openDoveServiceAppliance".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveServiceAppliance.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveServiceAppliance *_openDoveServiceAppliance = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveServiceAppliance."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveServiceAppliance", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveServiceAppliance.");
#endif
    _openDoveServiceAppliance = (FULLNS0OpenDoveServiceAppliance *)[FULLNS0OpenDoveServiceAppliance readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveServiceAppliance.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveServiceAppliance. Expected element openDoveServiceAppliance. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveServiceAppliance. Expected element openDoveServiceAppliance. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveServiceAppliance;
}

/**
 * Writes this FULLNS0OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveServiceAppliance to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveServiceAppliance", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveServiceAppliance. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveServiceAppliance for root element {}openDoveServiceAppliance...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveServiceAppliance for root element {}openDoveServiceAppliance...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveServiceAppliance. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ip_family", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setIp_family: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "build_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}build_version of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}build_version of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setBuild_version: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canBeDGW", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCanBeDGW: ((BOOL*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setIp: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "uuid", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}uuid of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}uuid of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canBeDCS", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCanBeDCS: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dcs_raw_service_port", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDcs_raw_service_port: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "timestamp", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setTimestamp: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "isDGW", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setIsDGW: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dcs_rest_service_port", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDcs_rest_service_port: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "isDCS", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setIsDCS: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dgw_config_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDgw_config_version: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dcs_config_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDcs_config_version: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dgw_rest_service_port", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDgw_rest_service_port: ((int*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self ip_family] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ip_family", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ip_family."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ip_family...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self ip_family]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ip_family...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}ip_family."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ip_family."];
    }
  }
  if ([self build_version]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "build_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}build_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}build_version...");
#endif
    [[self build_version] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}build_version...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}build_version."];
    }
  }
  if ([self canBeDGW] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canBeDGW", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canBeDGW."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canBeDGW...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self canBeDGW]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canBeDGW...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canBeDGW."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canBeDGW."];
    }
  }
  if ([self ip]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ip...");
#endif
    [[self ip] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ip."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "uuid", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}uuid."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}uuid...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}uuid...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}uuid."];
    }
  }
  if ([self canBeDCS] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canBeDCS", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canBeDCS."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canBeDCS...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self canBeDCS]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canBeDCS...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canBeDCS."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canBeDCS."];
    }
  }
  if ([self dcs_raw_service_port] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_raw_service_port", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dcs_raw_service_port."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dcs_raw_service_port...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self dcs_raw_service_port]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dcs_raw_service_port...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dcs_raw_service_port."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dcs_raw_service_port."];
    }
  }
  if ([self timestamp]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "timestamp", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}timestamp."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}timestamp...");
#endif
    [[self timestamp] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}timestamp...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}timestamp."];
    }
  }
  if ([self isDGW] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "isDGW", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}isDGW."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}isDGW...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self isDGW]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}isDGW...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}isDGW."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}isDGW."];
    }
  }
  if ([self dcs_rest_service_port] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_rest_service_port", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dcs_rest_service_port."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dcs_rest_service_port...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self dcs_rest_service_port]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dcs_rest_service_port...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dcs_rest_service_port."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dcs_rest_service_port."];
    }
  }
  if ([self isDCS] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "isDCS", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}isDCS."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}isDCS...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self isDCS]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}isDCS...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}isDCS."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}isDCS."];
    }
  }
  if ([self dgw_config_version] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dgw_config_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dgw_config_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dgw_config_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self dgw_config_version]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dgw_config_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dgw_config_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dgw_config_version."];
    }
  }
  if ([self dcs_config_version] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_config_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dcs_config_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dcs_config_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self dcs_config_version]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dcs_config_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dcs_config_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dcs_config_version."];
    }
  }
  if ([self dgw_rest_service_port] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dgw_rest_service_port", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dgw_rest_service_port."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dgw_rest_service_port...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self dgw_rest_service_port]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dgw_rest_service_port...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dgw_rest_service_port."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dgw_rest_service_port."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveServiceAppliance (JAXB) */

#endif /* DEF_FULLNS0OpenDoveServiceAppliance_M */
#ifndef DEF_FULLNS0OpenDoveDCSList_M
#define DEF_FULLNS0OpenDoveDCSList_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveDCSList

/**
 * (no documentation provided)
 */
- (NSArray *) bulkEndpoints
{
  return _bulkEndpoints;
}

/**
 * (no documentation provided)
 */
- (void) setBulkEndpoints: (NSArray *) newBulkEndpoints
{
  [newBulkEndpoints retain];
  [_bulkEndpoints release];
  _bulkEndpoints = newBulkEndpoints;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveServiceAppliance *) singletonEndpoint
{
  return _singletonEndpoint;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonEndpoint: (FULLNS0OpenDoveServiceAppliance *) newSingletonEndpoint
{
  [newSingletonEndpoint retain];
  [_singletonEndpoint release];
  _singletonEndpoint = newSingletonEndpoint;
}

- (void) dealloc
{
  [self setBulkEndpoints: nil];
  [self setSingletonEndpoint: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveDCSList *_fULLNS0OpenDoveDCSList;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveDCSList = (FULLNS0OpenDoveDCSList *) [FULLNS0OpenDoveDCSList readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveDCSList;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveDCSList */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveDCSList (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveDCSList (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveDCSList (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveDCSList from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveDCSList defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveDCSList *_fULLNS0OpenDoveDCSList = [[FULLNS0OpenDoveDCSList alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveDCSList initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveDCSList = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveDCSList autorelease];
  return _fULLNS0OpenDoveDCSList;
}

/**
 * Initialize this instance of FULLNS0OpenDoveDCSList according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveDCSList to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveDCSList from an XML reader. The element to be read is
 * "openDoveDCSList".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveDCSList.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveDCSList *_openDoveDCSList = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveDCSList."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveDCSList", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveDCSList.");
#endif
    _openDoveDCSList = (FULLNS0OpenDoveDCSList *)[FULLNS0OpenDoveDCSList readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveDCSList.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDCSList. Expected element openDoveDCSList. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDCSList. Expected element openDoveDCSList. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveDCSList;
}

/**
 * Writes this FULLNS0OpenDoveDCSList to XML under element name "openDoveDCSList".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveDCSList to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveDCSList", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveDCSList. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveDCSList for root element {}openDoveDCSList...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveDCSList for root element {}openDoveDCSList...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveDCSList. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oDCS_list", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oDCS_list of type {}openDoveServiceAppliance.");
#endif

    __child = [FULLNS0OpenDoveServiceAppliance readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oDCS_list of type {}openDoveServiceAppliance.");
#endif

    if ([self bulkEndpoints]) {
      [self setBulkEndpoints: [[self bulkEndpoints] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkEndpoints: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oDCS", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oDCS of type {}openDoveServiceAppliance.");
#endif
    __child = [FULLNS0OpenDoveServiceAppliance readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oDCS of type {}openDoveServiceAppliance.");
#endif

    [self setSingletonEndpoint: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self bulkEndpoints]) {
    __enumerator = [[self bulkEndpoints] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oDCS_list", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}oDCS_list."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}oDCS_list...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}oDCS_list...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}oDCS_list."];
      }
    } //end item iterator.
  }
  if ([self singletonEndpoint]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oDCS", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oDCS."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oDCS...");
#endif
    [[self singletonEndpoint] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oDCS...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oDCS."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveDCSList (JAXB) */

#endif /* DEF_FULLNS0OpenDoveDCSList_M */
#ifndef DEF_FULLNS0OpenDoveEndpointRequest_M
#define DEF_FULLNS0OpenDoveEndpointRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveEndpointRequest

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveEndpoint *) singletonEndpoint
{
  return _singletonEndpoint;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonEndpoint: (FULLNS0OpenDoveEndpoint *) newSingletonEndpoint
{
  [newSingletonEndpoint retain];
  [_singletonEndpoint release];
  _singletonEndpoint = newSingletonEndpoint;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkEndpoints
{
  return _bulkEndpoints;
}

/**
 * (no documentation provided)
 */
- (void) setBulkEndpoints: (NSArray *) newBulkEndpoints
{
  [newBulkEndpoints retain];
  [_bulkEndpoints release];
  _bulkEndpoints = newBulkEndpoints;
}

- (void) dealloc
{
  [self setSingletonEndpoint: nil];
  [self setBulkEndpoints: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveEndpointRequest *_fULLNS0OpenDoveEndpointRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveEndpointRequest = (FULLNS0OpenDoveEndpointRequest *) [FULLNS0OpenDoveEndpointRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveEndpointRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveEndpointRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveEndpointRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveEndpointRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveEndpointRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveEndpointRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveEndpointRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveEndpointRequest *_fULLNS0OpenDoveEndpointRequest = [[FULLNS0OpenDoveEndpointRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveEndpointRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveEndpointRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveEndpointRequest autorelease];
  return _fULLNS0OpenDoveEndpointRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveEndpointRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveEndpointRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveEndpointRequest from an XML reader. The element to be read is
 * "openDoveEndpointRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveEndpointRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveEndpointRequest *_openDoveEndpointRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveEndpointRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveEndpointRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveEndpointRequest.");
#endif
    _openDoveEndpointRequest = (FULLNS0OpenDoveEndpointRequest *)[FULLNS0OpenDoveEndpointRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveEndpointRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveEndpointRequest. Expected element openDoveEndpointRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveEndpointRequest. Expected element openDoveEndpointRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveEndpointRequest;
}

/**
 * Writes this FULLNS0OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveEndpointRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveEndpointRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveEndpointRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveEndpointRequest for root element {}openDoveEndpointRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveEndpointRequest for root element {}openDoveEndpointRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveEndpointRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "endpoint", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}endpoint of type {}openDoveEndpoint.");
#endif
    __child = [FULLNS0OpenDoveEndpoint readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}endpoint of type {}openDoveEndpoint.");
#endif

    [self setSingletonEndpoint: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "endpoints", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}endpoints of type {}openDoveEndpoint.");
#endif

    __child = [FULLNS0OpenDoveEndpoint readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}endpoints of type {}openDoveEndpoint.");
#endif

    if ([self bulkEndpoints]) {
      [self setBulkEndpoints: [[self bulkEndpoints] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkEndpoints: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self singletonEndpoint]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endpoint", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}endpoint."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}endpoint...");
#endif
    [[self singletonEndpoint] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}endpoint...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}endpoint."];
    }
  }
  if ([self bulkEndpoints]) {
    __enumerator = [[self bulkEndpoints] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endpoints", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}endpoints."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}endpoints...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}endpoints...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}endpoints."];
      }
    } //end item iterator.
  }
}
@end /* implementation FULLNS0OpenDoveEndpointRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveEndpointRequest_M */
#ifndef DEF_FULLNS0OpenDoveGWStats_M
#define DEF_FULLNS0OpenDoveGWStats_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveGWStats

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeavePkts
{
  return _ovlToExtLeavePkts;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeavePkts: (NSString *) newOvlToExtLeavePkts
{
  [newOvlToExtLeavePkts retain];
  [_ovlToExtLeavePkts release];
  _ovlToExtLeavePkts = newOvlToExtLeavePkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterBytes
{
  return _extToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterBytes: (NSString *) newExtToOvlEnterBytes
{
  [newExtToOvlEnterBytes retain];
  [_extToOvlEnterBytes release];
  _extToOvlEnterBytes = newExtToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterPps
{
  return _extToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterPps: (NSString *) newExtToOvlEnterPps
{
  [newExtToOvlEnterPps retain];
  [_extToOvlEnterPps release];
  _extToOvlEnterPps = newExtToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeaveBps
{
  return _ovlToExtLeaveBps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeaveBps: (NSString *) newOvlToExtLeaveBps
{
  [newOvlToExtLeaveBps retain];
  [_ovlToExtLeaveBps release];
  _ovlToExtLeaveBps = newOvlToExtLeaveBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeaveBps
{
  return _ovlToVlanLeaveBps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeaveBps: (NSString *) newOvlToVlanLeaveBps
{
  [newOvlToVlanLeaveBps retain];
  [_ovlToVlanLeaveBps release];
  _ovlToVlanLeaveBps = newOvlToVlanLeaveBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterBps
{
  return _vlanToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterBps: (NSString *) newVlanToOvlEnterBps
{
  [newVlanToOvlEnterBps retain];
  [_vlanToOvlEnterBps release];
  _vlanToOvlEnterBps = newVlanToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterPkts
{
  return _vlanToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterPkts: (NSString *) newVlanToOvlEnterPkts
{
  [newVlanToOvlEnterPkts retain];
  [_vlanToOvlEnterPkts release];
  _vlanToOvlEnterPkts = newVlanToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterBps
{
  return _extToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterBps: (NSString *) newExtToOvlEnterBps
{
  [newExtToOvlEnterBps retain];
  [_extToOvlEnterBps release];
  _extToOvlEnterBps = newExtToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeaveBytes
{
  return _ovlToVlanLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeaveBytes: (NSString *) newOvlToVlanLeaveBytes
{
  [newOvlToVlanLeaveBytes retain];
  [_ovlToVlanLeaveBytes release];
  _ovlToVlanLeaveBytes = newOvlToVlanLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeavePkts
{
  return _ovlToVlanLeavePkts;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeavePkts: (NSString *) newOvlToVlanLeavePkts
{
  [newOvlToVlanLeavePkts retain];
  [_ovlToVlanLeavePkts release];
  _ovlToVlanLeavePkts = newOvlToVlanLeavePkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterBytes
{
  return _vlanToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterBytes: (NSString *) newVlanToOvlEnterBytes
{
  [newVlanToOvlEnterBytes retain];
  [_vlanToOvlEnterBytes release];
  _vlanToOvlEnterBytes = newVlanToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeaveBytes
{
  return _ovlToExtLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeaveBytes: (NSString *) newOvlToExtLeaveBytes
{
  [newOvlToExtLeaveBytes retain];
  [_ovlToExtLeaveBytes release];
  _ovlToExtLeaveBytes = newOvlToExtLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeavePps
{
  return _ovlToExtLeavePps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeavePps: (NSString *) newOvlToExtLeavePps
{
  [newOvlToExtLeavePps retain];
  [_ovlToExtLeavePps release];
  _ovlToExtLeavePps = newOvlToExtLeavePps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeavePps
{
  return _ovlToVlanLeavePps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeavePps: (NSString *) newOvlToVlanLeavePps
{
  [newOvlToVlanLeavePps retain];
  [_ovlToVlanLeavePps release];
  _ovlToVlanLeavePps = newOvlToVlanLeavePps;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterPps
{
  return _vlanToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterPps: (NSString *) newVlanToOvlEnterPps
{
  [newVlanToOvlEnterPps retain];
  [_vlanToOvlEnterPps release];
  _vlanToOvlEnterPps = newVlanToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterPkts
{
  return _extToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterPkts: (NSString *) newExtToOvlEnterPkts
{
  [newExtToOvlEnterPkts retain];
  [_extToOvlEnterPkts release];
  _extToOvlEnterPkts = newExtToOvlEnterPkts;
}

- (void) dealloc
{
  [self setOvlToExtLeavePkts: nil];
  [self setExtToOvlEnterBytes: nil];
  [self setExtToOvlEnterPps: nil];
  [self setOvlToExtLeaveBps: nil];
  [self setOvlToVlanLeaveBps: nil];
  [self setVlanToOvlEnterBps: nil];
  [self setVlanToOvlEnterPkts: nil];
  [self setExtToOvlEnterBps: nil];
  [self setOvlToVlanLeaveBytes: nil];
  [self setOvlToVlanLeavePkts: nil];
  [self setVlanToOvlEnterBytes: nil];
  [self setOvlToExtLeaveBytes: nil];
  [self setOvlToExtLeavePps: nil];
  [self setOvlToVlanLeavePps: nil];
  [self setVlanToOvlEnterPps: nil];
  [self setExtToOvlEnterPkts: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveGWStats *_fULLNS0OpenDoveGWStats;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveGWStats = (FULLNS0OpenDoveGWStats *) [FULLNS0OpenDoveGWStats readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveGWStats;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveGWStats */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveGWStats (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveGWStats (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveGWStats (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveGWStats from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveGWStats defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveGWStats *_fULLNS0OpenDoveGWStats = [[FULLNS0OpenDoveGWStats alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveGWStats initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveGWStats = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveGWStats autorelease];
  return _fULLNS0OpenDoveGWStats;
}

/**
 * Initialize this instance of FULLNS0OpenDoveGWStats according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveGWStats to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveGWStats from an XML reader. The element to be read is
 * "openDoveGWStats".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveGWStats.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveGWStats *_openDoveGWStats = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveGWStats."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveGWStats", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveGWStats.");
#endif
    _openDoveGWStats = (FULLNS0OpenDoveGWStats *)[FULLNS0OpenDoveGWStats readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveGWStats.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWStats. Expected element openDoveGWStats. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWStats. Expected element openDoveGWStats. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveGWStats;
}

/**
 * Writes this FULLNS0OpenDoveGWStats to XML under element name "openDoveGWStats".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveGWStats to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveGWStats", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveGWStats. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveGWStats for root element {}openDoveGWStats...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveGWStats for root element {}openDoveGWStats...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveGWStats. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeavePkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterPps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeaveBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeaveBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterPkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeaveBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeavePkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeaveBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeavePps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeavePps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterPps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterPkts: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self ovlToExtLeavePkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_pkts...");
#endif
    [[self ovlToExtLeavePkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_pkts."];
    }
  }
  if ([self extToOvlEnterBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_bytes...");
#endif
    [[self extToOvlEnterBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_bytes."];
    }
  }
  if ([self extToOvlEnterPps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_pps...");
#endif
    [[self extToOvlEnterPps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_pps."];
    }
  }
  if ([self ovlToExtLeaveBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_bps...");
#endif
    [[self ovlToExtLeaveBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_bps."];
    }
  }
  if ([self ovlToVlanLeaveBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_bps...");
#endif
    [[self ovlToVlanLeaveBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_bps."];
    }
  }
  if ([self vlanToOvlEnterBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_bps...");
#endif
    [[self vlanToOvlEnterBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_bps."];
    }
  }
  if ([self vlanToOvlEnterPkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_pkts...");
#endif
    [[self vlanToOvlEnterPkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_pkts."];
    }
  }
  if ([self extToOvlEnterBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_bps...");
#endif
    [[self extToOvlEnterBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_bps."];
    }
  }
  if ([self ovlToVlanLeaveBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_bytes...");
#endif
    [[self ovlToVlanLeaveBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_bytes."];
    }
  }
  if ([self ovlToVlanLeavePkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_pkts...");
#endif
    [[self ovlToVlanLeavePkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_pkts."];
    }
  }
  if ([self vlanToOvlEnterBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_bytes...");
#endif
    [[self vlanToOvlEnterBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_bytes."];
    }
  }
  if ([self ovlToExtLeaveBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_bytes...");
#endif
    [[self ovlToExtLeaveBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_bytes."];
    }
  }
  if ([self ovlToExtLeavePps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_pps...");
#endif
    [[self ovlToExtLeavePps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_pps."];
    }
  }
  if ([self ovlToVlanLeavePps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_pps...");
#endif
    [[self ovlToVlanLeavePps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_pps."];
    }
  }
  if ([self vlanToOvlEnterPps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_pps...");
#endif
    [[self vlanToOvlEnterPps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_pps."];
    }
  }
  if ([self extToOvlEnterPkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_pkts...");
#endif
    [[self extToOvlEnterPkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_pkts."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveGWStats (JAXB) */

#endif /* DEF_FULLNS0OpenDoveGWStats_M */
#ifndef DEF_FULLNS0OpenDoveNetworkRequest_M
#define DEF_FULLNS0OpenDoveNetworkRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveNetworkRequest

/**
 * (no documentation provided)
 */
- (NSArray *) bulkNetworks
{
  return _bulkNetworks;
}

/**
 * (no documentation provided)
 */
- (void) setBulkNetworks: (NSArray *) newBulkNetworks
{
  [newBulkNetworks retain];
  [_bulkNetworks release];
  _bulkNetworks = newBulkNetworks;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveNetwork *) singletonNetwork
{
  return _singletonNetwork;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonNetwork: (FULLNS0OpenDoveNetwork *) newSingletonNetwork
{
  [newSingletonNetwork retain];
  [_singletonNetwork release];
  _singletonNetwork = newSingletonNetwork;
}

- (void) dealloc
{
  [self setBulkNetworks: nil];
  [self setSingletonNetwork: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveNetworkRequest *_fULLNS0OpenDoveNetworkRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveNetworkRequest = (FULLNS0OpenDoveNetworkRequest *) [FULLNS0OpenDoveNetworkRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveNetworkRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveNetworkRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveNetworkRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveNetworkRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveNetworkRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveNetworkRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveNetworkRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveNetworkRequest *_fULLNS0OpenDoveNetworkRequest = [[FULLNS0OpenDoveNetworkRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveNetworkRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveNetworkRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveNetworkRequest autorelease];
  return _fULLNS0OpenDoveNetworkRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveNetworkRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveNetworkRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveNetworkRequest from an XML reader. The element to be read is
 * "openDoveNetworkRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveNetworkRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveNetworkRequest *_openDoveNetworkRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveNetworkRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveNetworkRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveNetworkRequest.");
#endif
    _openDoveNetworkRequest = (FULLNS0OpenDoveNetworkRequest *)[FULLNS0OpenDoveNetworkRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveNetworkRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNetworkRequest. Expected element openDoveNetworkRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNetworkRequest. Expected element openDoveNetworkRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveNetworkRequest;
}

/**
 * Writes this FULLNS0OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveNetworkRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNetworkRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveNetworkRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveNetworkRequest for root element {}openDoveNetworkRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveNetworkRequest for root element {}openDoveNetworkRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveNetworkRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "networks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}networks of type {}openDoveNetwork.");
#endif

    __child = [FULLNS0OpenDoveNetwork readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}networks of type {}openDoveNetwork.");
#endif

    if ([self bulkNetworks]) {
      [self setBulkNetworks: [[self bulkNetworks] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkNetworks: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "network", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}network of type {}openDoveNetwork.");
#endif
    __child = [FULLNS0OpenDoveNetwork readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}network of type {}openDoveNetwork.");
#endif

    [self setSingletonNetwork: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self bulkNetworks]) {
    __enumerator = [[self bulkNetworks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "networks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}networks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}networks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}networks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}networks."];
      }
    } //end item iterator.
  }
  if ([self singletonNetwork]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "network", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}network."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}network...");
#endif
    [[self singletonNetwork] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}network...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}network."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveNetworkRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNetworkRequest_M */
#ifndef DEF_FULLNS0OpenDoveSwitchRequest_M
#define DEF_FULLNS0OpenDoveSwitchRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveSwitchRequest

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveSwitch *) singletonSwitch
{
  return _singletonSwitch;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonSwitch: (FULLNS0OpenDoveSwitch *) newSingletonSwitch
{
  [newSingletonSwitch retain];
  [_singletonSwitch release];
  _singletonSwitch = newSingletonSwitch;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkSwitches
{
  return _bulkSwitches;
}

/**
 * (no documentation provided)
 */
- (void) setBulkSwitches: (NSArray *) newBulkSwitches
{
  [newBulkSwitches retain];
  [_bulkSwitches release];
  _bulkSwitches = newBulkSwitches;
}

- (void) dealloc
{
  [self setSingletonSwitch: nil];
  [self setBulkSwitches: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveSwitchRequest *_fULLNS0OpenDoveSwitchRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveSwitchRequest = (FULLNS0OpenDoveSwitchRequest *) [FULLNS0OpenDoveSwitchRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveSwitchRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveSwitchRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveSwitchRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveSwitchRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveSwitchRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveSwitchRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveSwitchRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveSwitchRequest *_fULLNS0OpenDoveSwitchRequest = [[FULLNS0OpenDoveSwitchRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveSwitchRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveSwitchRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveSwitchRequest autorelease];
  return _fULLNS0OpenDoveSwitchRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveSwitchRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveSwitchRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveSwitchRequest from an XML reader. The element to be read is
 * "openDoveSwitchRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveSwitchRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveSwitchRequest *_openDoveSwitchRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveSwitchRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveSwitchRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveSwitchRequest.");
#endif
    _openDoveSwitchRequest = (FULLNS0OpenDoveSwitchRequest *)[FULLNS0OpenDoveSwitchRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveSwitchRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitchRequest. Expected element openDoveSwitchRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitchRequest. Expected element openDoveSwitchRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveSwitchRequest;
}

/**
 * Writes this FULLNS0OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveSwitchRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSwitchRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveSwitchRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveSwitchRequest for root element {}openDoveSwitchRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveSwitchRequest for root element {}openDoveSwitchRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveSwitchRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "switch", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}switch of type {}openDoveSwitch.");
#endif
    __child = [FULLNS0OpenDoveSwitch readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}switch of type {}openDoveSwitch.");
#endif

    [self setSingletonSwitch: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "switches", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}switches of type {}openDoveSwitch.");
#endif

    __child = [FULLNS0OpenDoveSwitch readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}switches of type {}openDoveSwitch.");
#endif

    if ([self bulkSwitches]) {
      [self setBulkSwitches: [[self bulkSwitches] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkSwitches: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self singletonSwitch]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "switch", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}switch."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}switch...");
#endif
    [[self singletonSwitch] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}switch...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}switch."];
    }
  }
  if ([self bulkSwitches]) {
    __enumerator = [[self bulkSwitches] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "switches", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}switches."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}switches...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}switches...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}switches."];
      }
    } //end item iterator.
  }
}
@end /* implementation FULLNS0OpenDoveSwitchRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveSwitchRequest_M */
#ifndef DEF_FULLNS0OpenDoveVGWVNIDMappingRequest_M
#define DEF_FULLNS0OpenDoveVGWVNIDMappingRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveVGWVNIDMappingRequest

/**
 * (no documentation provided)
 */
- (NSArray *) bulkMappings
{
  return _bulkMappings;
}

/**
 * (no documentation provided)
 */
- (void) setBulkMappings: (NSArray *) newBulkMappings
{
  [newBulkMappings retain];
  [_bulkMappings release];
  _bulkMappings = newBulkMappings;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveVGWVNIDMapping *) singletonMapping
{
  return _singletonMapping;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonMapping: (FULLNS0OpenDoveVGWVNIDMapping *) newSingletonMapping
{
  [newSingletonMapping retain];
  [_singletonMapping release];
  _singletonMapping = newSingletonMapping;
}

- (void) dealloc
{
  [self setBulkMappings: nil];
  [self setSingletonMapping: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveVGWVNIDMappingRequest *_fULLNS0OpenDoveVGWVNIDMappingRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveVGWVNIDMappingRequest = (FULLNS0OpenDoveVGWVNIDMappingRequest *) [FULLNS0OpenDoveVGWVNIDMappingRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveVGWVNIDMappingRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveVGWVNIDMappingRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveVGWVNIDMappingRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveVGWVNIDMappingRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveVGWVNIDMappingRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveVGWVNIDMappingRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveVGWVNIDMappingRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveVGWVNIDMappingRequest *_fULLNS0OpenDoveVGWVNIDMappingRequest = [[FULLNS0OpenDoveVGWVNIDMappingRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveVGWVNIDMappingRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveVGWVNIDMappingRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveVGWVNIDMappingRequest autorelease];
  return _fULLNS0OpenDoveVGWVNIDMappingRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveVGWVNIDMappingRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveVGWVNIDMappingRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveVGWVNIDMappingRequest from an XML reader. The element to be read is
 * "openDoveVGWVNIDMappingRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveVGWVNIDMappingRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveVGWVNIDMappingRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveVGWVNIDMappingRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveVGWVNIDMappingRequest.");
#endif
    _openDoveVGWVNIDMappingRequest = (FULLNS0OpenDoveVGWVNIDMappingRequest *)[FULLNS0OpenDoveVGWVNIDMappingRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveVGWVNIDMappingRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVGWVNIDMappingRequest. Expected element openDoveVGWVNIDMappingRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVGWVNIDMappingRequest. Expected element openDoveVGWVNIDMappingRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveVGWVNIDMappingRequest;
}

/**
 * Writes this FULLNS0OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveVGWVNIDMappingRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveVGWVNIDMappingRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveVGWVNIDMappingRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveVGWVNIDMappingRequest for root element {}openDoveVGWVNIDMappingRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveVGWVNIDMappingRequest for root element {}openDoveVGWVNIDMappingRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveVGWVNIDMappingRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "vnid_mapping_rules", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}vnid_mapping_rules of type {}openDoveVGWVNIDMapping.");
#endif

    __child = [FULLNS0OpenDoveVGWVNIDMapping readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vnid_mapping_rules of type {}openDoveVGWVNIDMapping.");
#endif

    if ([self bulkMappings]) {
      [self setBulkMappings: [[self bulkMappings] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkMappings: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "vnid_mapping_rule", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}vnid_mapping_rule of type {}openDoveVGWVNIDMapping.");
#endif
    __child = [FULLNS0OpenDoveVGWVNIDMapping readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vnid_mapping_rule of type {}openDoveVGWVNIDMapping.");
#endif

    [self setSingletonMapping: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self bulkMappings]) {
    __enumerator = [[self bulkMappings] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vnid_mapping_rules", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}vnid_mapping_rules."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}vnid_mapping_rules...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}vnid_mapping_rules...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}vnid_mapping_rules."];
      }
    } //end item iterator.
  }
  if ([self singletonMapping]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vnid_mapping_rule", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vnid_mapping_rule."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vnid_mapping_rule...");
#endif
    [[self singletonMapping] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vnid_mapping_rule...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vnid_mapping_rule."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveVGWVNIDMappingRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveVGWVNIDMappingRequest_M */
#ifndef DEF_FULLNS0OpenDoveVNIDStats_M
#define DEF_FULLNS0OpenDoveVNIDStats_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveVNIDStats

/**
 * (no documentation provided)
 */
- (NSString *) vnid
{
  return _vnid;
}

/**
 * (no documentation provided)
 */
- (void) setVnid: (NSString *) newVnid
{
  [newVnid retain];
  [_vnid release];
  _vnid = newVnid;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeaveBps
{
  return _ovlToExtLeaveBps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeaveBps: (NSString *) newOvlToExtLeaveBps
{
  [newOvlToExtLeaveBps retain];
  [_ovlToExtLeaveBps release];
  _ovlToExtLeaveBps = newOvlToExtLeaveBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeavePps
{
  return _ovlToVlanLeavePps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeavePps: (NSString *) newOvlToVlanLeavePps
{
  [newOvlToVlanLeavePps retain];
  [_ovlToVlanLeavePps release];
  _ovlToVlanLeavePps = newOvlToVlanLeavePps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeaveBytes
{
  return _ovlToVlanLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeaveBytes: (NSString *) newOvlToVlanLeaveBytes
{
  [newOvlToVlanLeaveBytes retain];
  [_ovlToVlanLeaveBytes release];
  _ovlToVlanLeaveBytes = newOvlToVlanLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterPps
{
  return _vlanToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterPps: (NSString *) newVlanToOvlEnterPps
{
  [newVlanToOvlEnterPps retain];
  [_vlanToOvlEnterPps release];
  _vlanToOvlEnterPps = newVlanToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeaveBytes
{
  return _ovlToExtLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeaveBytes: (NSString *) newOvlToExtLeaveBytes
{
  [newOvlToExtLeaveBytes retain];
  [_ovlToExtLeaveBytes release];
  _ovlToExtLeaveBytes = newOvlToExtLeaveBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterBps
{
  return _vlanToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterBps: (NSString *) newVlanToOvlEnterBps
{
  [newVlanToOvlEnterBps retain];
  [_vlanToOvlEnterBps release];
  _vlanToOvlEnterBps = newVlanToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterBps
{
  return _extToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterBps: (NSString *) newExtToOvlEnterBps
{
  [newExtToOvlEnterBps retain];
  [_extToOvlEnterBps release];
  _extToOvlEnterBps = newExtToOvlEnterBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterBytes
{
  return _vlanToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterBytes: (NSString *) newVlanToOvlEnterBytes
{
  [newVlanToOvlEnterBytes retain];
  [_vlanToOvlEnterBytes release];
  _vlanToOvlEnterBytes = newVlanToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterBytes
{
  return _extToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterBytes: (NSString *) newExtToOvlEnterBytes
{
  [newExtToOvlEnterBytes retain];
  [_extToOvlEnterBytes release];
  _extToOvlEnterBytes = newExtToOvlEnterBytes;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeaveBps
{
  return _ovlToVlanLeaveBps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeaveBps: (NSString *) newOvlToVlanLeaveBps
{
  [newOvlToVlanLeaveBps retain];
  [_ovlToVlanLeaveBps release];
  _ovlToVlanLeaveBps = newOvlToVlanLeaveBps;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeavePps
{
  return _ovlToExtLeavePps;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeavePps: (NSString *) newOvlToExtLeavePps
{
  [newOvlToExtLeavePps retain];
  [_ovlToExtLeavePps release];
  _ovlToExtLeavePps = newOvlToExtLeavePps;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterPkts
{
  return _extToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterPkts: (NSString *) newExtToOvlEnterPkts
{
  [newExtToOvlEnterPkts retain];
  [_extToOvlEnterPkts release];
  _extToOvlEnterPkts = newExtToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToVlanLeavePkts
{
  return _ovlToVlanLeavePkts;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToVlanLeavePkts: (NSString *) newOvlToVlanLeavePkts
{
  [newOvlToVlanLeavePkts retain];
  [_ovlToVlanLeavePkts release];
  _ovlToVlanLeavePkts = newOvlToVlanLeavePkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) ovlToExtLeavePkts
{
  return _ovlToExtLeavePkts;
}

/**
 * (no documentation provided)
 */
- (void) setOvlToExtLeavePkts: (NSString *) newOvlToExtLeavePkts
{
  [newOvlToExtLeavePkts retain];
  [_ovlToExtLeavePkts release];
  _ovlToExtLeavePkts = newOvlToExtLeavePkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) vlanToOvlEnterPkts
{
  return _vlanToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (void) setVlanToOvlEnterPkts: (NSString *) newVlanToOvlEnterPkts
{
  [newVlanToOvlEnterPkts retain];
  [_vlanToOvlEnterPkts release];
  _vlanToOvlEnterPkts = newVlanToOvlEnterPkts;
}

/**
 * (no documentation provided)
 */
- (NSString *) extToOvlEnterPps
{
  return _extToOvlEnterPps;
}

/**
 * (no documentation provided)
 */
- (void) setExtToOvlEnterPps: (NSString *) newExtToOvlEnterPps
{
  [newExtToOvlEnterPps retain];
  [_extToOvlEnterPps release];
  _extToOvlEnterPps = newExtToOvlEnterPps;
}

- (void) dealloc
{
  [self setVnid: nil];
  [self setOvlToExtLeaveBps: nil];
  [self setOvlToVlanLeavePps: nil];
  [self setOvlToVlanLeaveBytes: nil];
  [self setVlanToOvlEnterPps: nil];
  [self setOvlToExtLeaveBytes: nil];
  [self setVlanToOvlEnterBps: nil];
  [self setExtToOvlEnterBps: nil];
  [self setVlanToOvlEnterBytes: nil];
  [self setExtToOvlEnterBytes: nil];
  [self setOvlToVlanLeaveBps: nil];
  [self setOvlToExtLeavePps: nil];
  [self setExtToOvlEnterPkts: nil];
  [self setOvlToVlanLeavePkts: nil];
  [self setOvlToExtLeavePkts: nil];
  [self setVlanToOvlEnterPkts: nil];
  [self setExtToOvlEnterPps: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveVNIDStats *_fULLNS0OpenDoveVNIDStats;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveVNIDStats = (FULLNS0OpenDoveVNIDStats *) [FULLNS0OpenDoveVNIDStats readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveVNIDStats;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveVNIDStats */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveVNIDStats (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveVNIDStats (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveVNIDStats (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveVNIDStats from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveVNIDStats defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveVNIDStats *_fULLNS0OpenDoveVNIDStats = [[FULLNS0OpenDoveVNIDStats alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveVNIDStats initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveVNIDStats = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveVNIDStats autorelease];
  return _fULLNS0OpenDoveVNIDStats;
}

/**
 * Initialize this instance of FULLNS0OpenDoveVNIDStats according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveVNIDStats to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveVNIDStats from an XML reader. The element to be read is
 * "openDoveVNIDStats".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveVNIDStats.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveVNIDStats *_openDoveVNIDStats = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveVNIDStats."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveVNIDStats", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveVNIDStats.");
#endif
    _openDoveVNIDStats = (FULLNS0OpenDoveVNIDStats *)[FULLNS0OpenDoveVNIDStats readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveVNIDStats.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVNIDStats. Expected element openDoveVNIDStats. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVNIDStats. Expected element openDoveVNIDStats. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveVNIDStats;
}

/**
 * Writes this FULLNS0OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveVNIDStats to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveVNIDStats", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveVNIDStats. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveVNIDStats for root element {}openDoveVNIDStats...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveVNIDStats for root element {}openDoveVNIDStats...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveVNIDStats. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "net_id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}net_id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}net_id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVnid: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeaveBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeavePps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeaveBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterPps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeaveBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterBytes: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeaveBps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeavePps: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterPkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToVlanLeavePkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOvlToExtLeavePkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVlanToOvlEnterPkts: __child];
    return YES;
  } //end "if choice"

  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
    NSLog(@"Attempting to read choice {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExtToOvlEnterPps: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self vnid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}net_id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}net_id...");
#endif
    [[self vnid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}net_id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}net_id."];
    }
  }
  if ([self ovlToExtLeaveBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_bps...");
#endif
    [[self ovlToExtLeaveBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_bps."];
    }
  }
  if ([self ovlToVlanLeavePps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_pps...");
#endif
    [[self ovlToVlanLeavePps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_pps."];
    }
  }
  if ([self ovlToVlanLeaveBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_bytes...");
#endif
    [[self ovlToVlanLeaveBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_bytes."];
    }
  }
  if ([self vlanToOvlEnterPps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_pps...");
#endif
    [[self vlanToOvlEnterPps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_pps."];
    }
  }
  if ([self ovlToExtLeaveBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_bytes...");
#endif
    [[self ovlToExtLeaveBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_bytes."];
    }
  }
  if ([self vlanToOvlEnterBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_bps...");
#endif
    [[self vlanToOvlEnterBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_bps."];
    }
  }
  if ([self extToOvlEnterBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_bps...");
#endif
    [[self extToOvlEnterBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_bps."];
    }
  }
  if ([self vlanToOvlEnterBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_bytes...");
#endif
    [[self vlanToOvlEnterBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_bytes."];
    }
  }
  if ([self extToOvlEnterBytes]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bytes", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_bytes."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_bytes...");
#endif
    [[self extToOvlEnterBytes] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_bytes...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_bytes."];
    }
  }
  if ([self ovlToVlanLeaveBps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_bps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_bps...");
#endif
    [[self ovlToVlanLeaveBps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_bps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_bps."];
    }
  }
  if ([self ovlToExtLeavePps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_pps...");
#endif
    [[self ovlToExtLeavePps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_pps."];
    }
  }
  if ([self extToOvlEnterPkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_pkts...");
#endif
    [[self extToOvlEnterPkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_pkts."];
    }
  }
  if ([self ovlToVlanLeavePkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_vlan_leave_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_vlan_leave_pkts...");
#endif
    [[self ovlToVlanLeavePkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_vlan_leave_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_vlan_leave_pkts."];
    }
  }
  if ([self ovlToExtLeavePkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ovl_to_ext_leave_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ovl_to_ext_leave_pkts...");
#endif
    [[self ovlToExtLeavePkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ovl_to_ext_leave_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ovl_to_ext_leave_pkts."];
    }
  }
  if ([self vlanToOvlEnterPkts]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pkts", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan_to_ovl_enter_pkts."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan_to_ovl_enter_pkts...");
#endif
    [[self vlanToOvlEnterPkts] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan_to_ovl_enter_pkts...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan_to_ovl_enter_pkts."];
    }
  }
  if ([self extToOvlEnterPps]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pps", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ext_to_ovl_enter_pps."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ext_to_ovl_enter_pps...");
#endif
    [[self extToOvlEnterPps] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ext_to_ovl_enter_pps...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ext_to_ovl_enter_pps."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveVNIDStats (JAXB) */

#endif /* DEF_FULLNS0OpenDoveVNIDStats_M */
#ifndef DEF_FULLNS0OpenDoveSwitchStatsRequest_M
#define DEF_FULLNS0OpenDoveSwitchStatsRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveSwitchStatsRequest

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveNVP *) stat
{
  return _stat;
}

/**
 * (no documentation provided)
 */
- (void) setStat: (FULLNS0OpenDoveNVP *) newStat
{
  [newStat retain];
  [_stat release];
  _stat = newStat;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkStats
{
  return _bulkStats;
}

/**
 * (no documentation provided)
 */
- (void) setBulkStats: (NSArray *) newBulkStats
{
  [newBulkStats retain];
  [_bulkStats release];
  _bulkStats = newBulkStats;
}

- (void) dealloc
{
  [self setStat: nil];
  [self setBulkStats: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveSwitchStatsRequest *_fULLNS0OpenDoveSwitchStatsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveSwitchStatsRequest = (FULLNS0OpenDoveSwitchStatsRequest *) [FULLNS0OpenDoveSwitchStatsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveSwitchStatsRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveSwitchStatsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveSwitchStatsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveSwitchStatsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveSwitchStatsRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveSwitchStatsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveSwitchStatsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveSwitchStatsRequest *_fULLNS0OpenDoveSwitchStatsRequest = [[FULLNS0OpenDoveSwitchStatsRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveSwitchStatsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveSwitchStatsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveSwitchStatsRequest autorelease];
  return _fULLNS0OpenDoveSwitchStatsRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveSwitchStatsRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveSwitchStatsRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveSwitchStatsRequest from an XML reader. The element to be read is
 * "openDoveSwitchStatsRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveSwitchStatsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveSwitchStatsRequest *_openDoveSwitchStatsRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveSwitchStatsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveSwitchStatsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveSwitchStatsRequest.");
#endif
    _openDoveSwitchStatsRequest = (FULLNS0OpenDoveSwitchStatsRequest *)[FULLNS0OpenDoveSwitchStatsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveSwitchStatsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitchStatsRequest. Expected element openDoveSwitchStatsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitchStatsRequest. Expected element openDoveSwitchStatsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveSwitchStatsRequest;
}

/**
 * Writes this FULLNS0OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveSwitchStatsRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSwitchStatsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveSwitchStatsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveSwitchStatsRequest for root element {}openDoveSwitchStatsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveSwitchStatsRequest for root element {}openDoveSwitchStatsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveSwitchStatsRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "stat", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}stat of type {}openDoveNVP.");
#endif
    __child = [FULLNS0OpenDoveNVP readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}stat of type {}openDoveNVP.");
#endif

    [self setStat: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "stats", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}stats of type {}openDoveNVP.");
#endif

    __child = [FULLNS0OpenDoveNVP readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}stats of type {}openDoveNVP.");
#endif

    if ([self bulkStats]) {
      [self setBulkStats: [[self bulkStats] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkStats: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self stat]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "stat", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}stat."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}stat...");
#endif
    [[self stat] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}stat...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}stat."];
    }
  }
  if ([self bulkStats]) {
    __enumerator = [[self bulkStats] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "stats", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}stats."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}stats...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}stats...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}stats."];
      }
    } //end item iterator.
  }
}
@end /* implementation FULLNS0OpenDoveSwitchStatsRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveSwitchStatsRequest_M */
#ifndef DEF_FULLNS0OpenDoveServiceApplianceRequest_M
#define DEF_FULLNS0OpenDoveServiceApplianceRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveServiceApplianceRequest

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveServiceAppliance *) singletonAppliance
{
  return _singletonAppliance;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonAppliance: (FULLNS0OpenDoveServiceAppliance *) newSingletonAppliance
{
  [newSingletonAppliance retain];
  [_singletonAppliance release];
  _singletonAppliance = newSingletonAppliance;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkAppliances
{
  return _bulkAppliances;
}

/**
 * (no documentation provided)
 */
- (void) setBulkAppliances: (NSArray *) newBulkAppliances
{
  [newBulkAppliances retain];
  [_bulkAppliances release];
  _bulkAppliances = newBulkAppliances;
}

- (void) dealloc
{
  [self setSingletonAppliance: nil];
  [self setBulkAppliances: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveServiceApplianceRequest *_fULLNS0OpenDoveServiceApplianceRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveServiceApplianceRequest = (FULLNS0OpenDoveServiceApplianceRequest *) [FULLNS0OpenDoveServiceApplianceRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveServiceApplianceRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveServiceApplianceRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveServiceApplianceRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveServiceApplianceRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveServiceApplianceRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveServiceApplianceRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveServiceApplianceRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveServiceApplianceRequest *_fULLNS0OpenDoveServiceApplianceRequest = [[FULLNS0OpenDoveServiceApplianceRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveServiceApplianceRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveServiceApplianceRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveServiceApplianceRequest autorelease];
  return _fULLNS0OpenDoveServiceApplianceRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveServiceApplianceRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveServiceApplianceRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveServiceApplianceRequest from an XML reader. The element to be read is
 * "openDoveServiceApplianceRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveServiceApplianceRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveServiceApplianceRequest *_openDoveServiceApplianceRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveServiceApplianceRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveServiceApplianceRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveServiceApplianceRequest.");
#endif
    _openDoveServiceApplianceRequest = (FULLNS0OpenDoveServiceApplianceRequest *)[FULLNS0OpenDoveServiceApplianceRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveServiceApplianceRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveServiceApplianceRequest. Expected element openDoveServiceApplianceRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveServiceApplianceRequest. Expected element openDoveServiceApplianceRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveServiceApplianceRequest;
}

/**
 * Writes this FULLNS0OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveServiceApplianceRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveServiceApplianceRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveServiceApplianceRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveServiceApplianceRequest for root element {}openDoveServiceApplianceRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveServiceApplianceRequest for root element {}openDoveServiceApplianceRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveServiceApplianceRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "service_appliance", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}service_appliance of type {}openDoveServiceAppliance.");
#endif
    __child = [FULLNS0OpenDoveServiceAppliance readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}service_appliance of type {}openDoveServiceAppliance.");
#endif

    [self setSingletonAppliance: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "service_appliances", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}service_appliances of type {}openDoveServiceAppliance.");
#endif

    __child = [FULLNS0OpenDoveServiceAppliance readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}service_appliances of type {}openDoveServiceAppliance.");
#endif

    if ([self bulkAppliances]) {
      [self setBulkAppliances: [[self bulkAppliances] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkAppliances: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self singletonAppliance]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service_appliance", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}service_appliance."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}service_appliance...");
#endif
    [[self singletonAppliance] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}service_appliance...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}service_appliance."];
    }
  }
  if ([self bulkAppliances]) {
    __enumerator = [[self bulkAppliances] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service_appliances", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}service_appliances."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}service_appliances...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}service_appliances...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}service_appliances."];
      }
    } //end item iterator.
  }
}
@end /* implementation FULLNS0OpenDoveServiceApplianceRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveServiceApplianceRequest_M */
#ifndef DEF_FULLNS0OpenDoveGwIpv4Request_M
#define DEF_FULLNS0OpenDoveGwIpv4Request_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveGwIpv4Request

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveGwIpv4 *) singletonPool
{
  return _singletonPool;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonPool: (FULLNS0OpenDoveGwIpv4 *) newSingletonPool
{
  [newSingletonPool retain];
  [_singletonPool release];
  _singletonPool = newSingletonPool;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkPools
{
  return _bulkPools;
}

/**
 * (no documentation provided)
 */
- (void) setBulkPools: (NSArray *) newBulkPools
{
  [newBulkPools retain];
  [_bulkPools release];
  _bulkPools = newBulkPools;
}

- (void) dealloc
{
  [self setSingletonPool: nil];
  [self setBulkPools: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveGwIpv4Request *_fULLNS0OpenDoveGwIpv4Request;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveGwIpv4Request = (FULLNS0OpenDoveGwIpv4Request *) [FULLNS0OpenDoveGwIpv4Request readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveGwIpv4Request;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveGwIpv4Request */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveGwIpv4Request (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveGwIpv4Request (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveGwIpv4Request (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveGwIpv4Request from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveGwIpv4Request defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveGwIpv4Request *_fULLNS0OpenDoveGwIpv4Request = [[FULLNS0OpenDoveGwIpv4Request alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveGwIpv4Request initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveGwIpv4Request = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveGwIpv4Request autorelease];
  return _fULLNS0OpenDoveGwIpv4Request;
}

/**
 * Initialize this instance of FULLNS0OpenDoveGwIpv4Request according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveGwIpv4Request to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveGwIpv4Request from an XML reader. The element to be read is
 * "openDoveGwIpv4Request".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveGwIpv4Request.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveGwIpv4Request *_openDoveGwIpv4Request = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveGwIpv4Request."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveGwIpv4Request", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveGwIpv4Request.");
#endif
    _openDoveGwIpv4Request = (FULLNS0OpenDoveGwIpv4Request *)[FULLNS0OpenDoveGwIpv4Request readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveGwIpv4Request.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGwIpv4Request. Expected element openDoveGwIpv4Request. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGwIpv4Request. Expected element openDoveGwIpv4Request. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveGwIpv4Request;
}

/**
 * Writes this FULLNS0OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveGwIpv4Request to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveGwIpv4Request", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveGwIpv4Request. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveGwIpv4Request for root element {}openDoveGwIpv4Request...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveGwIpv4Request for root element {}openDoveGwIpv4Request...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveGwIpv4Request. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "gw_ipv4_assignment", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}gw_ipv4_assignment of type {}openDoveGwIpv4.");
#endif
    __child = [FULLNS0OpenDoveGwIpv4 readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}gw_ipv4_assignment of type {}openDoveGwIpv4.");
#endif

    [self setSingletonPool: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "gw_ipv4_assignments", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}gw_ipv4_assignments of type {}openDoveGwIpv4.");
#endif

    __child = [FULLNS0OpenDoveGwIpv4 readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}gw_ipv4_assignments of type {}openDoveGwIpv4.");
#endif

    if ([self bulkPools]) {
      [self setBulkPools: [[self bulkPools] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkPools: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self singletonPool]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gw_ipv4_assignment", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}gw_ipv4_assignment."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}gw_ipv4_assignment...");
#endif
    [[self singletonPool] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}gw_ipv4_assignment...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}gw_ipv4_assignment."];
    }
  }
  if ([self bulkPools]) {
    __enumerator = [[self bulkPools] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gw_ipv4_assignments", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}gw_ipv4_assignments."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}gw_ipv4_assignments...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}gw_ipv4_assignments...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}gw_ipv4_assignments."];
      }
    } //end item iterator.
  }
}
@end /* implementation FULLNS0OpenDoveGwIpv4Request (JAXB) */

#endif /* DEF_FULLNS0OpenDoveGwIpv4Request_M */
#ifndef DEF_FULLNS0OpenDoveGWSessionStatsRequest_M
#define DEF_FULLNS0OpenDoveGWSessionStatsRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveGWSessionStatsRequest

/**
 * (no documentation provided)
 */
- (NSArray *) bulkSessions
{
  return _bulkSessions;
}

/**
 * (no documentation provided)
 */
- (void) setBulkSessions: (NSArray *) newBulkSessions
{
  [newBulkSessions retain];
  [_bulkSessions release];
  _bulkSessions = newBulkSessions;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveGWSession *) singletonSession
{
  return _singletonSession;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonSession: (FULLNS0OpenDoveGWSession *) newSingletonSession
{
  [newSingletonSession retain];
  [_singletonSession release];
  _singletonSession = newSingletonSession;
}

- (void) dealloc
{
  [self setBulkSessions: nil];
  [self setSingletonSession: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveGWSessionStatsRequest *_fULLNS0OpenDoveGWSessionStatsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveGWSessionStatsRequest = (FULLNS0OpenDoveGWSessionStatsRequest *) [FULLNS0OpenDoveGWSessionStatsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveGWSessionStatsRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveGWSessionStatsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveGWSessionStatsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveGWSessionStatsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveGWSessionStatsRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveGWSessionStatsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveGWSessionStatsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveGWSessionStatsRequest *_fULLNS0OpenDoveGWSessionStatsRequest = [[FULLNS0OpenDoveGWSessionStatsRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveGWSessionStatsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveGWSessionStatsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveGWSessionStatsRequest autorelease];
  return _fULLNS0OpenDoveGWSessionStatsRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveGWSessionStatsRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveGWSessionStatsRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveGWSessionStatsRequest from an XML reader. The element to be read is
 * "openDoveGWSessionStatsRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveGWSessionStatsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveGWSessionStatsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveGWSessionStatsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveGWSessionStatsRequest.");
#endif
    _openDoveGWSessionStatsRequest = (FULLNS0OpenDoveGWSessionStatsRequest *)[FULLNS0OpenDoveGWSessionStatsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveGWSessionStatsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWSessionStatsRequest. Expected element openDoveGWSessionStatsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGWSessionStatsRequest. Expected element openDoveGWSessionStatsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveGWSessionStatsRequest;
}

/**
 * Writes this FULLNS0OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveGWSessionStatsRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveGWSessionStatsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveGWSessionStatsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveGWSessionStatsRequest for root element {}openDoveGWSessionStatsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveGWSessionStatsRequest for root element {}openDoveGWSessionStatsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveGWSessionStatsRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "sessions", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}sessions of type {}openDoveGWSession.");
#endif

    __child = [FULLNS0OpenDoveGWSession readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}sessions of type {}openDoveGWSession.");
#endif

    if ([self bulkSessions]) {
      [self setBulkSessions: [[self bulkSessions] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkSessions: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "session", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}session of type {}openDoveGWSession.");
#endif
    __child = [FULLNS0OpenDoveGWSession readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}session of type {}openDoveGWSession.");
#endif

    [self setSingletonSession: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self bulkSessions]) {
    __enumerator = [[self bulkSessions] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sessions", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}sessions."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}sessions...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}sessions...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}sessions."];
      }
    } //end item iterator.
  }
  if ([self singletonSession]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "session", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}session."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}session...");
#endif
    [[self singletonSession] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}session...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}session."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveGWSessionStatsRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveGWSessionStatsRequest_M */
#ifndef DEF_FULLNS0OpenDoveDomainRequest_M
#define DEF_FULLNS0OpenDoveDomainRequest_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveDomainRequest

/**
 * (no documentation provided)
 */
- (NSArray *) bulkDomains
{
  return _bulkDomains;
}

/**
 * (no documentation provided)
 */
- (void) setBulkDomains: (NSArray *) newBulkDomains
{
  [newBulkDomains retain];
  [_bulkDomains release];
  _bulkDomains = newBulkDomains;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveDomain *) singletonDomain
{
  return _singletonDomain;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonDomain: (FULLNS0OpenDoveDomain *) newSingletonDomain
{
  [newSingletonDomain retain];
  [_singletonDomain release];
  _singletonDomain = newSingletonDomain;
}

- (void) dealloc
{
  [self setBulkDomains: nil];
  [self setSingletonDomain: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveDomainRequest *_fULLNS0OpenDoveDomainRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveDomainRequest = (FULLNS0OpenDoveDomainRequest *) [FULLNS0OpenDoveDomainRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveDomainRequest;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveDomainRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveDomainRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveDomainRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveDomainRequest (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveDomainRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveDomainRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveDomainRequest *_fULLNS0OpenDoveDomainRequest = [[FULLNS0OpenDoveDomainRequest alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveDomainRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveDomainRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveDomainRequest autorelease];
  return _fULLNS0OpenDoveDomainRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveDomainRequest according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveDomainRequest to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveDomainRequest from an XML reader. The element to be read is
 * "openDoveDomainRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveDomainRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveDomainRequest *_openDoveDomainRequest = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveDomainRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveDomainRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveDomainRequest.");
#endif
    _openDoveDomainRequest = (FULLNS0OpenDoveDomainRequest *)[FULLNS0OpenDoveDomainRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveDomainRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDomainRequest. Expected element openDoveDomainRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDomainRequest. Expected element openDoveDomainRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveDomainRequest;
}

/**
 * Writes this FULLNS0OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveDomainRequest to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveDomainRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveDomainRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveDomainRequest for root element {}openDoveDomainRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveDomainRequest for root element {}openDoveDomainRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveDomainRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "domains", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}domains of type {}openDoveDomain.");
#endif

    __child = [FULLNS0OpenDoveDomain readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}domains of type {}openDoveDomain.");
#endif

    if ([self bulkDomains]) {
      [self setBulkDomains: [[self bulkDomains] arrayByAddingObject: __child]];
    }
    else {
      [self setBulkDomains: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "domain", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}domain of type {}openDoveDomain.");
#endif
    __child = [FULLNS0OpenDoveDomain readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}domain of type {}openDoveDomain.");
#endif

    [self setSingletonDomain: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self bulkDomains]) {
    __enumerator = [[self bulkDomains] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domains", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}domains."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}domains...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}domains...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}domains."];
      }
    } //end item iterator.
  }
  if ([self singletonDomain]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}domain."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}domain...");
#endif
    [[self singletonDomain] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}domain...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}domain."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveDomainRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveDomainRequest_M */
#ifndef DEF_FULLNS0OpenDoveEndpoint_M
#define DEF_FULLNS0OpenDoveEndpoint_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveEndpoint

/**
 * (no documentation provided)
 */
- (NSString *) physIP
{
  return _physIP;
}

/**
 * (no documentation provided)
 */
- (void) setPhysIP: (NSString *) newPhysIP
{
  [newPhysIP retain];
  [_physIP release];
  _physIP = newPhysIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) virtIP
{
  return _virtIP;
}

/**
 * (no documentation provided)
 */
- (void) setVirtIP: (NSString *) newVirtIP
{
  [newVirtIP retain];
  [_virtIP release];
  _virtIP = newVirtIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) mac
{
  return _mac;
}

/**
 * (no documentation provided)
 */
- (void) setMac: (NSString *) newMac
{
  [newMac retain];
  [_mac release];
  _mac = newMac;
}

/**
 * (no documentation provided)
 */
- (NSString *) hostIP
{
  return _hostIP;
}

/**
 * (no documentation provided)
 */
- (void) setHostIP: (NSString *) newHostIP
{
  [newHostIP retain];
  [_hostIP release];
  _hostIP = newHostIP;
}

- (void) dealloc
{
  [self setPhysIP: nil];
  [self setVirtIP: nil];
  [self setMac: nil];
  [self setHostIP: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveEndpoint *_fULLNS0OpenDoveEndpoint;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveEndpoint = (FULLNS0OpenDoveEndpoint *) [FULLNS0OpenDoveEndpoint readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveEndpoint;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveEndpoint */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveEndpoint (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveEndpoint (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveEndpoint (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveEndpoint from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveEndpoint defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveEndpoint *_fULLNS0OpenDoveEndpoint = [[FULLNS0OpenDoveEndpoint alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveEndpoint initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveEndpoint = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveEndpoint autorelease];
  return _fULLNS0OpenDoveEndpoint;
}

/**
 * Initialize this instance of FULLNS0OpenDoveEndpoint according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveEndpoint to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveEndpoint from an XML reader. The element to be read is
 * "openDoveEndpoint".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveEndpoint.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveEndpoint *_openDoveEndpoint = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveEndpoint."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveEndpoint", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveEndpoint.");
#endif
    _openDoveEndpoint = (FULLNS0OpenDoveEndpoint *)[FULLNS0OpenDoveEndpoint readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveEndpoint.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveEndpoint. Expected element openDoveEndpoint. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveEndpoint. Expected element openDoveEndpoint. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveEndpoint;
}

/**
 * Writes this FULLNS0OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveEndpoint to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveEndpoint", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveEndpoint. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveEndpoint for root element {}openDoveEndpoint...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveEndpoint for root element {}openDoveEndpoint...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveEndpoint. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "physical IPs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}physical IPs of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}physical IPs of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPhysIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "virtual IPs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}virtual IPs of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}virtual IPs of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setVirtIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "mac", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}mac of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}mac of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMac: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "Host IP", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}Host IP of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}Host IP of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setHostIP: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self physIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "physical IPs", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}physical IPs."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}physical IPs...");
#endif
    [[self physIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}physical IPs...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}physical IPs."];
    }
  }
  if ([self virtIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "virtual IPs", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}virtual IPs."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}virtual IPs...");
#endif
    [[self virtIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}virtual IPs...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}virtual IPs."];
    }
  }
  if ([self mac]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mac", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}mac."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}mac...");
#endif
    [[self mac] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}mac...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}mac."];
    }
  }
  if ([self hostIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "Host IP", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}Host IP."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}Host IP...");
#endif
    [[self hostIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}Host IP...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}Host IP."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveEndpoint (JAXB) */

#endif /* DEF_FULLNS0OpenDoveEndpoint_M */
#ifndef DEF_FULLNS0OpenDoveSwitch_M
#define DEF_FULLNS0OpenDoveSwitch_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveSwitch

/**
 * (no documentation provided)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (int *) lastChangeVersion
{
  return _lastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (void) setLastChangeVersion: (int *) newLastChangeVersion
{
  if (_lastChangeVersion != NULL) {
    free(_lastChangeVersion);
  }
  _lastChangeVersion = newLastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (NSString *) timestamp
{
  return _timestamp;
}

/**
 * (no documentation provided)
 */
- (void) setTimestamp: (NSString *) newTimestamp
{
  [newTimestamp retain];
  [_timestamp release];
  _timestamp = newTimestamp;
}

/**
 * (no documentation provided)
 */
- (NSString *) name
{
  return _name;
}

/**
 * (no documentation provided)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * (no documentation provided)
 */
- (NSString *) tunnelIP
{
  return _tunnelIP;
}

/**
 * (no documentation provided)
 */
- (void) setTunnelIP: (NSString *) newTunnelIP
{
  [newTunnelIP retain];
  [_tunnelIP release];
  _tunnelIP = newTunnelIP;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

/**
 * (no documentation provided)
 */
- (NSString *) mgmtIP
{
  return _mgmtIP;
}

/**
 * (no documentation provided)
 */
- (void) setMgmtIP: (NSString *) newMgmtIP
{
  [newMgmtIP retain];
  [_mgmtIP release];
  _mgmtIP = newMgmtIP;
}

/**
 * (no documentation provided)
 */
- (int *) createVersion
{
  return _createVersion;
}

/**
 * (no documentation provided)
 */
- (void) setCreateVersion: (int *) newCreateVersion
{
  if (_createVersion != NULL) {
    free(_createVersion);
  }
  _createVersion = newCreateVersion;
}

- (void) dealloc
{
  [self setTombstoneFlag: NULL];
  [self setLastChangeVersion: NULL];
  [self setTimestamp: nil];
  [self setName: nil];
  [self setTunnelIP: nil];
  [self setUuid: nil];
  [self setMgmtIP: nil];
  [self setCreateVersion: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveSwitch *_fULLNS0OpenDoveSwitch;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveSwitch = (FULLNS0OpenDoveSwitch *) [FULLNS0OpenDoveSwitch readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveSwitch;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveSwitch */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveSwitch (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveSwitch (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveSwitch (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveSwitch from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveSwitch defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveSwitch *_fULLNS0OpenDoveSwitch = [[FULLNS0OpenDoveSwitch alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveSwitch initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveSwitch = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveSwitch autorelease];
  return _fULLNS0OpenDoveSwitch;
}

/**
 * Initialize this instance of FULLNS0OpenDoveSwitch according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveSwitch to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveSwitch from an XML reader. The element to be read is
 * "openDoveSwitch".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveSwitch.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveSwitch *_openDoveSwitch = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveSwitch."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveSwitch", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveSwitch.");
#endif
    _openDoveSwitch = (FULLNS0OpenDoveSwitch *)[FULLNS0OpenDoveSwitch readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveSwitch.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitch. Expected element openDoveSwitch. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveSwitch. Expected element openDoveSwitch. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveSwitch;
}

/**
 * Writes this FULLNS0OpenDoveSwitch to XML under element name "openDoveSwitch".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveSwitch to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSwitch", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveSwitch. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveSwitch for root element {}openDoveSwitch...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveSwitch for root element {}openDoveSwitch...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveSwitch. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setTombstoneFlag: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setLastChangeVersion: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "timestamp", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setTimestamp: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setName: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "tunnelip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}tunnelip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}tunnelip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setTunnelIP: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "managementip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}managementip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}managementip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMgmtIP: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCreateVersion: ((int*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self tombstoneFlag] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}is_tombstone."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}is_tombstone...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self tombstoneFlag]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}is_tombstone...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}is_tombstone."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}is_tombstone."];
    }
  }
  if ([self lastChangeVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}change_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}change_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self lastChangeVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}change_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}change_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}change_version."];
    }
  }
  if ([self timestamp]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "timestamp", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}timestamp."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}timestamp...");
#endif
    [[self timestamp] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}timestamp...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}timestamp."];
    }
  }
  if ([self name]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}name."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}name...");
#endif
    [[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}name...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}name."];
    }
  }
  if ([self tunnelIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tunnelip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}tunnelip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}tunnelip...");
#endif
    [[self tunnelIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}tunnelip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}tunnelip."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}id...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
  if ([self mgmtIP]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "managementip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}managementip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}managementip...");
#endif
    [[self mgmtIP] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}managementip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}managementip."];
    }
  }
  if ([self createVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}create_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}create_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self createVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}create_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}create_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}create_version."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveSwitch (JAXB) */

#endif /* DEF_FULLNS0OpenDoveSwitch_M */
#ifndef DEF_FULLNS0OpenDoveVGWVNIDMapping_M
#define DEF_FULLNS0OpenDoveVGWVNIDMapping_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveVGWVNIDMapping

/**
 * (no documentation provided)
 */
- (int *) lastChangeVersion
{
  return _lastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (void) setLastChangeVersion: (int *) newLastChangeVersion
{
  if (_lastChangeVersion != NULL) {
    free(_lastChangeVersion);
  }
  _lastChangeVersion = newLastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (int *) createVersion
{
  return _createVersion;
}

/**
 * (no documentation provided)
 */
- (void) setCreateVersion: (int *) newCreateVersion
{
  if (_createVersion != NULL) {
    free(_createVersion);
  }
  _createVersion = newCreateVersion;
}

/**
 * (no documentation provided)
 */
- (int *) vnid
{
  return _vnid;
}

/**
 * (no documentation provided)
 */
- (void) setVnid: (int *) newVnid
{
  if (_vnid != NULL) {
    free(_vnid);
  }
  _vnid = newVnid;
}

/**
 * (no documentation provided)
 */
- (int *) vlanID
{
  return _vlanID;
}

/**
 * (no documentation provided)
 */
- (void) setVlanID: (int *) newVlanID
{
  if (_vlanID != NULL) {
    free(_vlanID);
  }
  _vlanID = newVlanID;
}

/**
 * (no documentation provided)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (NSString *) gatewayUUID
{
  return _gatewayUUID;
}

/**
 * (no documentation provided)
 */
- (void) setGatewayUUID: (NSString *) newGatewayUUID
{
  [newGatewayUUID retain];
  [_gatewayUUID release];
  _gatewayUUID = newGatewayUUID;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

- (void) dealloc
{
  [self setLastChangeVersion: NULL];
  [self setCreateVersion: NULL];
  [self setVnid: NULL];
  [self setVlanID: NULL];
  [self setTombstoneFlag: NULL];
  [self setGatewayUUID: nil];
  [self setUuid: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveVGWVNIDMapping *_fULLNS0OpenDoveVGWVNIDMapping;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveVGWVNIDMapping = (FULLNS0OpenDoveVGWVNIDMapping *) [FULLNS0OpenDoveVGWVNIDMapping readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveVGWVNIDMapping;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveVGWVNIDMapping */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveVGWVNIDMapping (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveVGWVNIDMapping (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveVGWVNIDMapping (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveVGWVNIDMapping from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveVGWVNIDMapping defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveVGWVNIDMapping *_fULLNS0OpenDoveVGWVNIDMapping = [[FULLNS0OpenDoveVGWVNIDMapping alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveVGWVNIDMapping initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveVGWVNIDMapping = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveVGWVNIDMapping autorelease];
  return _fULLNS0OpenDoveVGWVNIDMapping;
}

/**
 * Initialize this instance of FULLNS0OpenDoveVGWVNIDMapping according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveVGWVNIDMapping to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveVGWVNIDMapping from an XML reader. The element to be read is
 * "openDoveVGWVNIDMapping".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveVGWVNIDMapping.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveVGWVNIDMapping *_openDoveVGWVNIDMapping = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveVGWVNIDMapping."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveVGWVNIDMapping", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveVGWVNIDMapping.");
#endif
    _openDoveVGWVNIDMapping = (FULLNS0OpenDoveVGWVNIDMapping *)[FULLNS0OpenDoveVGWVNIDMapping readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveVGWVNIDMapping.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVGWVNIDMapping. Expected element openDoveVGWVNIDMapping. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveVGWVNIDMapping. Expected element openDoveVGWVNIDMapping. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveVGWVNIDMapping;
}

/**
 * Writes this FULLNS0OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveVGWVNIDMapping to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveVGWVNIDMapping", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveVGWVNIDMapping. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveVGWVNIDMapping for root element {}openDoveVGWVNIDMapping...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveVGWVNIDMapping for root element {}openDoveVGWVNIDMapping...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveVGWVNIDMapping. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setLastChangeVersion: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCreateVersion: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "net_id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setVnid: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "vlan", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setVlanID: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setTombstoneFlag: ((BOOL*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "gatewayUUID", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}gatewayUUID of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}gatewayUUID of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setGatewayUUID: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self lastChangeVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}change_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}change_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self lastChangeVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}change_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}change_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}change_version."];
    }
  }
  if ([self createVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}create_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}create_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self createVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}create_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}create_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}create_version."];
    }
  }
  if ([self vnid] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}net_id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}net_id...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self vnid]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}net_id...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}net_id."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}net_id."];
    }
  }
  if ([self vlanID] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self vlanID]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}vlan."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan."];
    }
  }
  if ([self tombstoneFlag] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}is_tombstone."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}is_tombstone...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self tombstoneFlag]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}is_tombstone...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}is_tombstone."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}is_tombstone."];
    }
  }
  if ([self gatewayUUID]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gatewayUUID", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}gatewayUUID."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}gatewayUUID...");
#endif
    [[self gatewayUUID] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}gatewayUUID...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}gatewayUUID."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}id...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveVGWVNIDMapping (JAXB) */

#endif /* DEF_FULLNS0OpenDoveVGWVNIDMapping_M */
#ifndef DEF_FULLNS0OpenDoveNetwork_M
#define DEF_FULLNS0OpenDoveNetwork_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveNetwork

/**
 * (no documentation provided)
 */
- (NSString *) domain_uuid
{
  return _domain_uuid;
}

/**
 * (no documentation provided)
 */
- (void) setDomain_uuid: (NSString *) newDomain_uuid
{
  [newDomain_uuid retain];
  [_domain_uuid release];
  _domain_uuid = newDomain_uuid;
}

/**
 * (no documentation provided)
 */
- (int *) vnid
{
  return _vnid;
}

/**
 * (no documentation provided)
 */
- (void) setVnid: (int *) newVnid
{
  if (_vnid != NULL) {
    free(_vnid);
  }
  _vnid = newVnid;
}

/**
 * (no documentation provided)
 */
- (int *) networkType
{
  return _networkType;
}

/**
 * (no documentation provided)
 */
- (void) setNetworkType: (int *) newNetworkType
{
  if (_networkType != NULL) {
    free(_networkType);
  }
  _networkType = newNetworkType;
}

/**
 * (no documentation provided)
 */
- (NSString *) name
{
  return _name;
}

/**
 * (no documentation provided)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * (no documentation provided)
 */
- (int *) createVersion
{
  return _createVersion;
}

/**
 * (no documentation provided)
 */
- (void) setCreateVersion: (int *) newCreateVersion
{
  if (_createVersion != NULL) {
    free(_createVersion);
  }
  _createVersion = newCreateVersion;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

/**
 * (no documentation provided)
 */
- (int *) lastChangeVersion
{
  return _lastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (void) setLastChangeVersion: (int *) newLastChangeVersion
{
  if (_lastChangeVersion != NULL) {
    free(_lastChangeVersion);
  }
  _lastChangeVersion = newLastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

- (void) dealloc
{
  [self setDomain_uuid: nil];
  [self setVnid: NULL];
  [self setNetworkType: NULL];
  [self setName: nil];
  [self setCreateVersion: NULL];
  [self setUuid: nil];
  [self setLastChangeVersion: NULL];
  [self setTombstoneFlag: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveNetwork *_fULLNS0OpenDoveNetwork;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveNetwork = (FULLNS0OpenDoveNetwork *) [FULLNS0OpenDoveNetwork readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveNetwork;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveNetwork */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveNetwork (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveNetwork (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveNetwork (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveNetwork from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveNetwork defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveNetwork *_fULLNS0OpenDoveNetwork = [[FULLNS0OpenDoveNetwork alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveNetwork initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveNetwork = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveNetwork autorelease];
  return _fULLNS0OpenDoveNetwork;
}

/**
 * Initialize this instance of FULLNS0OpenDoveNetwork according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveNetwork to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveNetwork from an XML reader. The element to be read is
 * "openDoveNetwork".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveNetwork.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveNetwork *_openDoveNetwork = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveNetwork."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveNetwork", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveNetwork.");
#endif
    _openDoveNetwork = (FULLNS0OpenDoveNetwork *)[FULLNS0OpenDoveNetwork readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveNetwork.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNetwork. Expected element openDoveNetwork. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveNetwork. Expected element openDoveNetwork. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveNetwork;
}

/**
 * Writes this FULLNS0OpenDoveNetwork to XML under element name "openDoveNetwork".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveNetwork to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNetwork", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveNetwork. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveNetwork for root element {}openDoveNetwork...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveNetwork for root element {}openDoveNetwork...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveNetwork. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "domain_uuid", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setDomain_uuid: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "network_id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setVnid: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setNetworkType: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setName: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCreateVersion: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setLastChangeVersion: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setTombstoneFlag: ((BOOL*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self domain_uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_uuid", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}domain_uuid."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}domain_uuid...");
#endif
    [[self domain_uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}domain_uuid...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}domain_uuid."];
    }
  }
  if ([self vnid] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "network_id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}network_id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}network_id...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self vnid]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}network_id...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}network_id."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}network_id."];
    }
  }
  if ([self networkType] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}type."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}type...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self networkType]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}type...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}type."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}type."];
    }
  }
  if ([self name]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}name."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}name...");
#endif
    [[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}name...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}name."];
    }
  }
  if ([self createVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}create_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}create_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self createVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}create_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}create_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}create_version."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}id...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
  if ([self lastChangeVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}change_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}change_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self lastChangeVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}change_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}change_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}change_version."];
    }
  }
  if ([self tombstoneFlag] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}is_tombstone."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}is_tombstone...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self tombstoneFlag]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}is_tombstone...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}is_tombstone."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}is_tombstone."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveNetwork (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNetwork_M */
#ifndef DEF_FULLNS0OpenDoveGwIpv4_M
#define DEF_FULLNS0OpenDoveGwIpv4_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveGwIpv4

/**
 * (no documentation provided)
 */
- (NSString *) mask
{
  return _mask;
}

/**
 * (no documentation provided)
 */
- (void) setMask: (NSString *) newMask
{
  [newMask retain];
  [_mask release];
  _mask = newMask;
}

/**
 * (no documentation provided)
 */
- (NSString *) type
{
  return _type;
}

/**
 * (no documentation provided)
 */
- (void) setType: (NSString *) newType
{
  [newType retain];
  [_type release];
  _type = newType;
}

/**
 * (no documentation provided)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (NSString *) gwUUID
{
  return _gwUUID;
}

/**
 * (no documentation provided)
 */
- (void) setGwUUID: (NSString *) newGwUUID
{
  [newGwUUID retain];
  [_gwUUID release];
  _gwUUID = newGwUUID;
}

/**
 * (no documentation provided)
 */
- (int *) lastChangeVersion
{
  return _lastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (void) setLastChangeVersion: (int *) newLastChangeVersion
{
  if (_lastChangeVersion != NULL) {
    free(_lastChangeVersion);
  }
  _lastChangeVersion = newLastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (int *) vlan
{
  return _vlan;
}

/**
 * (no documentation provided)
 */
- (void) setVlan: (int *) newVlan
{
  if (_vlan != NULL) {
    free(_vlan);
  }
  _vlan = newVlan;
}

/**
 * (no documentation provided)
 */
- (int *) createVersion
{
  return _createVersion;
}

/**
 * (no documentation provided)
 */
- (void) setCreateVersion: (int *) newCreateVersion
{
  if (_createVersion != NULL) {
    free(_createVersion);
  }
  _createVersion = newCreateVersion;
}

/**
 * (no documentation provided)
 */
- (NSString *) ip
{
  return _ip;
}

/**
 * (no documentation provided)
 */
- (void) setIp: (NSString *) newIp
{
  [newIp retain];
  [_ip release];
  _ip = newIp;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

/**
 * (no documentation provided)
 */
- (NSString *) nexthop
{
  return _nexthop;
}

/**
 * (no documentation provided)
 */
- (void) setNexthop: (NSString *) newNexthop
{
  [newNexthop retain];
  [_nexthop release];
  _nexthop = newNexthop;
}

- (void) dealloc
{
  [self setMask: nil];
  [self setType: nil];
  [self setTombstoneFlag: NULL];
  [self setGwUUID: nil];
  [self setLastChangeVersion: NULL];
  [self setVlan: NULL];
  [self setCreateVersion: NULL];
  [self setIp: nil];
  [self setUuid: nil];
  [self setNexthop: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveGwIpv4 *_fULLNS0OpenDoveGwIpv4;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveGwIpv4 = (FULLNS0OpenDoveGwIpv4 *) [FULLNS0OpenDoveGwIpv4 readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveGwIpv4;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveGwIpv4 */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveGwIpv4 (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveGwIpv4 (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveGwIpv4 (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveGwIpv4 from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveGwIpv4 defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveGwIpv4 *_fULLNS0OpenDoveGwIpv4 = [[FULLNS0OpenDoveGwIpv4 alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveGwIpv4 initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveGwIpv4 = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveGwIpv4 autorelease];
  return _fULLNS0OpenDoveGwIpv4;
}

/**
 * Initialize this instance of FULLNS0OpenDoveGwIpv4 according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveGwIpv4 to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveGwIpv4 from an XML reader. The element to be read is
 * "openDoveGwIpv4".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveGwIpv4.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveGwIpv4 *_openDoveGwIpv4 = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveGwIpv4."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveGwIpv4", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveGwIpv4.");
#endif
    _openDoveGwIpv4 = (FULLNS0OpenDoveGwIpv4 *)[FULLNS0OpenDoveGwIpv4 readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveGwIpv4.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGwIpv4. Expected element openDoveGwIpv4. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveGwIpv4. Expected element openDoveGwIpv4. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveGwIpv4;
}

/**
 * Writes this FULLNS0OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveGwIpv4 to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveGwIpv4", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveGwIpv4. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveGwIpv4 for root element {}openDoveGwIpv4...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveGwIpv4 for root element {}openDoveGwIpv4...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveGwIpv4. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "mask", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}mask of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}mask of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMask: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "intf_type", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}intf_type of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}intf_type of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setType: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setTombstoneFlag: ((BOOL*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "gwUUID", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}gwUUID of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}gwUUID of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setGwUUID: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setLastChangeVersion: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "vlan", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setVlan: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCreateVersion: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ip", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setIp: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "nexthop", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}nexthop of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}nexthop of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setNexthop: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self mask]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mask", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}mask."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}mask...");
#endif
    [[self mask] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}mask...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}mask."];
    }
  }
  if ([self type]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "intf_type", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}intf_type."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}intf_type...");
#endif
    [[self type] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}intf_type...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}intf_type."];
    }
  }
  if ([self tombstoneFlag] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}is_tombstone."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}is_tombstone...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self tombstoneFlag]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}is_tombstone...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}is_tombstone."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}is_tombstone."];
    }
  }
  if ([self gwUUID]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gwUUID", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}gwUUID."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}gwUUID...");
#endif
    [[self gwUUID] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}gwUUID...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}gwUUID."];
    }
  }
  if ([self lastChangeVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}change_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}change_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self lastChangeVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}change_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}change_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}change_version."];
    }
  }
  if ([self vlan] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}vlan."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}vlan...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self vlan]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}vlan...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}vlan."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}vlan."];
    }
  }
  if ([self createVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}create_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}create_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self createVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}create_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}create_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}create_version."];
    }
  }
  if ([self ip]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ip", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}ip."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}ip...");
#endif
    [[self ip] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}ip...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}ip."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}id...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
  if ([self nexthop]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "nexthop", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}nexthop."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}nexthop...");
#endif
    [[self nexthop] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}nexthop...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}nexthop."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveGwIpv4 (JAXB) */

#endif /* DEF_FULLNS0OpenDoveGwIpv4_M */
#ifndef DEF_FULLNS0OpenDoveDomain_M
#define DEF_FULLNS0OpenDoveDomain_M

/**
 * (no documentation provided)
 */
@implementation FULLNS0OpenDoveDomain

/**
 * (no documentation provided)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (int *) replicationFactor
{
  return _replicationFactor;
}

/**
 * (no documentation provided)
 */
- (void) setReplicationFactor: (int *) newReplicationFactor
{
  if (_replicationFactor != NULL) {
    free(_replicationFactor);
  }
  _replicationFactor = newReplicationFactor;
}

/**
 * (no documentation provided)
 */
- (int *) createVersion
{
  return _createVersion;
}

/**
 * (no documentation provided)
 */
- (void) setCreateVersion: (int *) newCreateVersion
{
  if (_createVersion != NULL) {
    free(_createVersion);
  }
  _createVersion = newCreateVersion;
}

/**
 * (no documentation provided)
 */
- (NSString *) name
{
  return _name;
}

/**
 * (no documentation provided)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * (no documentation provided)
 */
- (int *) lastChangeVersion
{
  return _lastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (void) setLastChangeVersion: (int *) newLastChangeVersion
{
  if (_lastChangeVersion != NULL) {
    free(_lastChangeVersion);
  }
  _lastChangeVersion = newLastChangeVersion;
}

/**
 * (no documentation provided)
 */
- (NSString *) uuid
{
  return _uuid;
}

/**
 * (no documentation provided)
 */
- (void) setUuid: (NSString *) newUuid
{
  [newUuid retain];
  [_uuid release];
  _uuid = newUuid;
}

- (void) dealloc
{
  [self setTombstoneFlag: NULL];
  [self setReplicationFactor: NULL];
  [self setCreateVersion: NULL];
  [self setName: nil];
  [self setLastChangeVersion: NULL];
  [self setUuid: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  FULLNS0OpenDoveDomain *_fULLNS0OpenDoveDomain;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _fULLNS0OpenDoveDomain = (FULLNS0OpenDoveDomain *) [FULLNS0OpenDoveDomain readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _fULLNS0OpenDoveDomain;
}

//documentation inherited.
- (NSData *) writeToXML
{
  xmlBufferPtr buf;
  xmlTextWriterPtr writer;
  int rc;
  NSData *data;

  buf = xmlBufferCreate();
  if (buf == NULL) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML buffer."];
    return nil;
  }

  writer = xmlNewTextWriterMemory(buf, 0);
  if (writer == NULL) {
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error creating an XML writer."];
    return nil;
  }

  rc = xmlTextWriterStartDocument(writer, NULL, "utf-8", NULL);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML start document."];
    return nil;
  }

  NS_DURING
  {
    [self writeXMLElement: writer];
  }
  NS_HANDLER
  {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [localException raise];
  }
  NS_ENDHANDLER

  rc = xmlTextWriterEndDocument(writer);
  if (rc < 0) {
    xmlFreeTextWriter(writer);
    xmlBufferFree(buf);
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing XML end document."];
    return nil;
  }

  xmlFreeTextWriter(writer);
  data = [NSData dataWithBytes: buf->content length: buf->use];
  xmlBufferFree(buf);
  return data;
}
@end /* implementation FULLNS0OpenDoveDomain */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface FULLNS0OpenDoveDomain (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface FULLNS0OpenDoveDomain (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation FULLNS0OpenDoveDomain (JAXB)

/**
 * Read an instance of FULLNS0OpenDoveDomain from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of FULLNS0OpenDoveDomain defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  FULLNS0OpenDoveDomain *_fULLNS0OpenDoveDomain = [[FULLNS0OpenDoveDomain alloc] init];
  NS_DURING
  {
    [_fULLNS0OpenDoveDomain initWithReader: reader];
  }
  NS_HANDLER
  {
    _fULLNS0OpenDoveDomain = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_fULLNS0OpenDoveDomain autorelease];
  return _fULLNS0OpenDoveDomain;
}

/**
 * Initialize this instance of FULLNS0OpenDoveDomain according to
 * the XML being read from the reader.
 *
 * @param reader The reader.
 */
- (id) initWithReader: (xmlTextReaderPtr) reader
{
  return [super initWithReader: reader];
}

/**
 * Write the XML for this instance of FULLNS0OpenDoveDomain to the writer.
 * Note that since we're only writing the XML type,
 * No start/end element will be written.
 *
 * @param reader The reader.
 */
- (void) writeXMLType: (xmlTextWriterPtr) writer
{
  [super writeXMLType:writer];
}

/**
 * Reads a FULLNS0OpenDoveDomain from an XML reader. The element to be read is
 * "openDoveDomain".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveDomain.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveDomain *_openDoveDomain = nil;

  if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
    if (status < 1) {
      [NSException raise: @"XMLReadError"
                   format: @"Error advancing the reader to start element openDoveDomain."];
    }
  }

  if (xmlStrcmp(BAD_CAST "openDoveDomain", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}openDoveDomain.");
#endif
    _openDoveDomain = (FULLNS0OpenDoveDomain *)[FULLNS0OpenDoveDomain readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}openDoveDomain.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDomain. Expected element openDoveDomain. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read FULLNS0OpenDoveDomain. Expected element openDoveDomain. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _openDoveDomain;
}

/**
 * Writes this FULLNS0OpenDoveDomain to XML under element name "openDoveDomain".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this FULLNS0OpenDoveDomain to an XML writer.
 *
 * @param writer The writer.
 * @param writeNs Whether to write the namespaces for this element to the xml writer.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer writeNamespaces: (BOOL) writeNs
{
  int rc = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveDomain", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveDomain. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveDomain for root element {}openDoveDomain...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveDomain for root element {}openDoveDomain...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveDomain. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadBooleanType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setTombstoneFlag: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "replication_factor", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setReplicationFactor: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCreateVersion: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setName: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadIntType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setLastChangeVersion: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUuid: __child];
    return YES;
  } //end "if choice"


  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self tombstoneFlag] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}is_tombstone."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}is_tombstone...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self tombstoneFlag]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}is_tombstone...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}is_tombstone."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}is_tombstone."];
    }
  }
  if ([self replicationFactor] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "replication_factor", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}replication_factor."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}replication_factor...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self replicationFactor]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}replication_factor...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}replication_factor."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}replication_factor."];
    }
  }
  if ([self createVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}create_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}create_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self createVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}create_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}create_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}create_version."];
    }
  }
  if ([self name]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}name."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}name...");
#endif
    [[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}name...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}name."];
    }
  }
  if ([self lastChangeVersion] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}change_version."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}change_version...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self lastChangeVersion]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}change_version...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}change_version."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}change_version."];
    }
  }
  if ([self uuid]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}id."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}id...");
#endif
    [[self uuid] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveDomain (JAXB) */

#endif /* DEF_FULLNS0OpenDoveDomain_M */
