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

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

/**
 * (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)
 */
- (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)
 */
- (BOOL *) isDGW
{
  return _isDGW;
}

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

/**
 * (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)
 */
- (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)
 */
- (BOOL *) canBeDCS
{
  return _canBeDCS;
}

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

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

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

/**
 * (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)
 */
- (NSString *) ip
{
  return _ip;
}

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

/**
 * (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 *) uuid
{
  return _uuid;
}

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

/**
 * (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;
}

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

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

- (void) dealloc
{
  [self setDcs_rest_service_port: NULL];
  [self setDcs_config_version: NULL];
  [self setIsDGW: NULL];
  [self setBuild_version: nil];
  [self setIp_family: NULL];
  [self setCanBeDCS: NULL];
  [self setCanBeDGW: NULL];
  [self setIsDCS: NULL];
  [self setDgw_config_version: NULL];
  [self setIp: nil];
  [self setDcs_raw_service_port: NULL];
  [self setUuid: nil];
  [self setDgw_rest_service_port: NULL];
  [self setTimestamp: nil];
  [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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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 "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;
  }
  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"


  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 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 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 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 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 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 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 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 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 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 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 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 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."];
    }
  }
  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."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveServiceAppliance (JAXB) */

#endif /* DEF_FULLNS0OpenDoveServiceAppliance_M */
#ifndef DEF_FULLNS0OpenDovePolicyRequest_M
#define DEF_FULLNS0OpenDovePolicyRequest_M

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

/**
 * (no documentation provided)
 */
- (NSArray *) bulkPolicies
{
  return _bulkPolicies;
}

/**
 * (no documentation provided)
 */
- (void) setBulkPolicies: (NSArray *) newBulkPolicies
{
  [newBulkPolicies retain];
  [_bulkPolicies release];
  _bulkPolicies = newBulkPolicies;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDovePolicy *) singletonPolicy
{
  return _singletonPolicy;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonPolicy: (FULLNS0OpenDovePolicy *) newSingletonPolicy
{
  [newSingletonPolicy retain];
  [_singletonPolicy release];
  _singletonPolicy = newSingletonPolicy;
}

- (void) dealloc
{
  [self setBulkPolicies: nil];
  [self setSingletonPolicy: nil];
  [super dealloc];
}

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

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

//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 FULLNS0OpenDovePolicyRequest */

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

@end /*interface FULLNS0OpenDovePolicyRequest (JAXB)*/

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

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

  [_fULLNS0OpenDovePolicyRequest autorelease];
  return _fULLNS0OpenDovePolicyRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDovePolicyRequest 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 FULLNS0OpenDovePolicyRequest 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 FULLNS0OpenDovePolicyRequest from an XML reader. The element to be read is
 * "openDovePolicyRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDovePolicyRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDovePolicyRequest *_openDovePolicyRequest = 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 openDovePolicyRequest."];
    }
  }

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

  return _openDovePolicyRequest;
}

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

/**
 * Writes this FULLNS0OpenDovePolicyRequest 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 "openDovePolicyRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDovePolicyRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDovePolicyRequest for root element {}openDovePolicyRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDovePolicyRequest for root element {}openDovePolicyRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDovePolicyRequest. 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 "policies", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

    [self setSingletonPolicy: __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 bulkPolicies]) {
    __enumerator = [[self bulkPolicies] objectEnumerator];

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

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

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

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

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

#endif /* DEF_FULLNS0OpenDovePolicyRequest_M */
#ifndef DEF_FULLNS0OpenDoveNetworkRequest_M
#define DEF_FULLNS0OpenDoveNetworkRequest_M

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

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

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

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

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

- (void) dealloc
{
  [self setSingletonNetwork: nil];
  [self setBulkNetworks: 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 "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"

  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"


  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 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."];
    }
  }
  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.
  }
}
@end /* implementation FULLNS0OpenDoveNetworkRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNetworkRequest_M */
#ifndef DEF_FULLNS0OpenDoveDomainRequest_M
#define DEF_FULLNS0OpenDoveDomainRequest_M

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

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveDomain *) singletonDomain
{
  return _singletonDomain;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonDomain: (FULLNS0OpenDoveDomain *) newSingletonDomain
{
  [newSingletonDomain retain];
  [_singletonDomain release];
  _singletonDomain = newSingletonDomain;
}

/**
 * (no documentation provided)
 */
- (NSArray *) bulkDomains
{
  return _bulkDomains;
}

/**
 * (no documentation provided)
 */
- (void) setBulkDomains: (NSArray *) newBulkDomains
{
  [newBulkDomains retain];
  [_bulkDomains release];
  _bulkDomains = newBulkDomains;
}

- (void) dealloc
{
  [self setSingletonDomain: nil];
  [self setBulkDomains: 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 "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"

  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"


  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 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."];
    }
  }
  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.
  }
}
@end /* implementation FULLNS0OpenDoveDomainRequest (JAXB) */

#endif /* DEF_FULLNS0OpenDoveDomainRequest_M */
#ifndef DEF_FULLNS0OpenDoveSubnetRequest_M
#define DEF_FULLNS0OpenDoveSubnetRequest_M

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

/**
 * (no documentation provided)
 */
- (NSArray *) bulkSubnets
{
  return _bulkSubnets;
}

/**
 * (no documentation provided)
 */
- (void) setBulkSubnets: (NSArray *) newBulkSubnets
{
  [newBulkSubnets retain];
  [_bulkSubnets release];
  _bulkSubnets = newBulkSubnets;
}

/**
 * (no documentation provided)
 */
- (FULLNS0OpenDoveSubnet *) singletonSubnet
{
  return _singletonSubnet;
}

/**
 * (no documentation provided)
 */
- (void) setSingletonSubnet: (FULLNS0OpenDoveSubnet *) newSingletonSubnet
{
  [newSingletonSubnet retain];
  [_singletonSubnet release];
  _singletonSubnet = newSingletonSubnet;
}

- (void) dealloc
{
  [self setBulkSubnets: nil];
  [self setSingletonSubnet: nil];
  [super dealloc];
}

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

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

//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 FULLNS0OpenDoveSubnetRequest */

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

@end /*interface FULLNS0OpenDoveSubnetRequest (JAXB)*/

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

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

  [_fULLNS0OpenDoveSubnetRequest autorelease];
  return _fULLNS0OpenDoveSubnetRequest;
}

/**
 * Initialize this instance of FULLNS0OpenDoveSubnetRequest 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 FULLNS0OpenDoveSubnetRequest 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 FULLNS0OpenDoveSubnetRequest from an XML reader. The element to be read is
 * "openDoveSubnetRequest".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveSubnetRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveSubnetRequest *_openDoveSubnetRequest = 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 openDoveSubnetRequest."];
    }
  }

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

  return _openDoveSubnetRequest;
}

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

/**
 * Writes this FULLNS0OpenDoveSubnetRequest 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 "openDoveSubnetRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveSubnetRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveSubnetRequest for root element {}openDoveSubnetRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveSubnetRequest for root element {}openDoveSubnetRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveSubnetRequest. 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 "subnets", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

    [self setSingletonSubnet: __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 bulkSubnets]) {
    __enumerator = [[self bulkSubnets] objectEnumerator];

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

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

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

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

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

#endif /* DEF_FULLNS0OpenDoveSubnetRequest_M */
#ifndef DEF_FULLNS0OpenDoveChange_M
#define DEF_FULLNS0OpenDoveChange_M

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

/**
 * (no documentation provided)
 */
- (NSString *) method
{
  return _method;
}

/**
 * (no documentation provided)
 */
- (void) setMethod: (NSString *) newMethod
{
  [newMethod retain];
  [_method release];
  _method = newMethod;
}

/**
 * (no documentation provided)
 */
- (NSString *) uri
{
  return _uri;
}

/**
 * (no documentation provided)
 */
- (void) setUri: (NSString *) newUri
{
  [newUri retain];
  [_uri release];
  _uri = newUri;
}

/**
 * (no documentation provided)
 */
- (int *) nextChange
{
  return _nextChange;
}

/**
 * (no documentation provided)
 */
- (void) setNextChange: (int *) newNextChange
{
  if (_nextChange != NULL) {
    free(_nextChange);
  }
  _nextChange = newNextChange;
}

- (void) dealloc
{
  [self setMethod: nil];
  [self setUri: nil];
  [self setNextChange: NULL];
  [super dealloc];
}

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

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

//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 FULLNS0OpenDoveChange */

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

@end /*interface FULLNS0OpenDoveChange (JAXB)*/

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

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

  [_fULLNS0OpenDoveChange autorelease];
  return _fULLNS0OpenDoveChange;
}

/**
 * Initialize this instance of FULLNS0OpenDoveChange 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 FULLNS0OpenDoveChange 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 FULLNS0OpenDoveChange from an XML reader. The element to be read is
 * "openDoveChange".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveChange.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveChange *_openDoveChange = 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 openDoveChange."];
    }
  }

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

  return _openDoveChange;
}

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

/**
 * Writes this FULLNS0OpenDoveChange 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 "openDoveChange", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveChange. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveChange for root element {}openDoveChange...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveChange for root element {}openDoveChange...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveChange. 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 "method", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "next_change", 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 setNextChange: ((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 method]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "method", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}method."];
    }

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

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

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

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

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

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

#endif /* DEF_FULLNS0OpenDoveChange_M */
#ifndef DEF_FULLNS0OpenDoveSwitch_M
#define DEF_FULLNS0OpenDoveSwitch_M

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

/**
 * (no documentation provided)
 */
- (NSString *) mgmtIP
{
  return _mgmtIP;
}

/**
 * (no documentation provided)
 */
- (void) setMgmtIP: (NSString *) newMgmtIP
{
  [newMgmtIP retain];
  [_mgmtIP release];
  _mgmtIP = newMgmtIP;
}

/**
 * (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 *) uuid
{
  return _uuid;
}

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

/**
 * (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)
 */
- (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 *) tunnelIP
{
  return _tunnelIP;
}

/**
 * (no documentation provided)
 */
- (void) setTunnelIP: (NSString *) newTunnelIP
{
  [newTunnelIP retain];
  [_tunnelIP release];
  _tunnelIP = newTunnelIP;
}

- (void) dealloc
{
  [self setMgmtIP: nil];
  [self setTombstoneFlag: NULL];
  [self setUuid: nil];
  [self setName: nil];
  [self setCreateVersion: NULL];
  [self setLastChangeVersion: NULL];
  [self setTimestamp: nil];
  [self setTunnelIP: nil];
  [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 "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 "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 "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 "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 "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 "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"


  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 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 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 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 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 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 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."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveSwitch (JAXB) */

#endif /* DEF_FULLNS0OpenDoveSwitch_M */
#ifndef DEF_FULLNS0OpenDoveSubnet_M
#define DEF_FULLNS0OpenDoveSubnet_M

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

/**
 * (no documentation provided)
 */
- (NSString *) domainUUID
{
  return _domainUUID;
}

/**
 * (no documentation provided)
 */
- (void) setDomainUUID: (NSString *) newDomainUUID
{
  [newDomainUUID retain];
  [_domainUUID release];
  _domainUUID = newDomainUUID;
}

/**
 * (no documentation provided)
 */
- (NSString *) subnet
{
  return _subnet;
}

/**
 * (no documentation provided)
 */
- (void) setSubnet: (NSString *) newSubnet
{
  [newSubnet retain];
  [_subnet release];
  _subnet = newSubnet;
}

/**
 * (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 *) subnetType
{
  return _subnetType;
}

/**
 * (no documentation provided)
 */
- (void) setSubnetType: (NSString *) newSubnetType
{
  [newSubnetType retain];
  [_subnetType release];
  _subnetType = newSubnetType;
}

/**
 * (no documentation provided)
 */
- (NSArray *) networkUUIDs
{
  return _networkUUIDs;
}

/**
 * (no documentation provided)
 */
- (void) setNetworkUUIDs: (NSArray *) newNetworkUUIDs
{
  [newNetworkUUIDs retain];
  [_networkUUIDs release];
  _networkUUIDs = newNetworkUUIDs;
}

/**
 * (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)
 */
- (NSString *) nexthop
{
  return _nexthop;
}

/**
 * (no documentation provided)
 */
- (void) setNexthop: (NSString *) newNexthop
{
  [newNexthop retain];
  [_nexthop release];
  _nexthop = newNexthop;
}

/**
 * (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 *) mask
{
  return _mask;
}

/**
 * (no documentation provided)
 */
- (void) setMask: (NSString *) newMask
{
  [newMask retain];
  [_mask release];
  _mask = newMask;
}

- (void) dealloc
{
  [self setDomainUUID: nil];
  [self setSubnet: nil];
  [self setLastChangeVersion: NULL];
  [self setSubnetType: nil];
  [self setNetworkUUIDs: nil];
  [self setCreateVersion: NULL];
  [self setUuid: nil];
  [self setNexthop: nil];
  [self setTombstoneFlag: NULL];
  [self setMask: nil];
  [super dealloc];
}

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

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

//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 FULLNS0OpenDoveSubnet */

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

@end /*interface FULLNS0OpenDoveSubnet (JAXB)*/

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

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

  [_fULLNS0OpenDoveSubnet autorelease];
  return _fULLNS0OpenDoveSubnet;
}

/**
 * Initialize this instance of FULLNS0OpenDoveSubnet 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 FULLNS0OpenDoveSubnet 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 FULLNS0OpenDoveSubnet from an XML reader. The element to be read is
 * "openDoveSubnet".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDoveSubnet.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDoveSubnet *_openDoveSubnet = 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 openDoveSubnet."];
    }
  }

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

  return _openDoveSubnet;
}

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

/**
 * Writes this FULLNS0OpenDoveSubnet 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 "openDoveSubnet", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDoveSubnet. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDoveSubnet for root element {}openDoveSubnet...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDoveSubnet for root element {}openDoveSubnet...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDoveSubnet. 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_id", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

    [self setSubnet: __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 "type", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}network_ids of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

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

    if ([self networkUUIDs]) {
      [self setNetworkUUIDs: [[self networkUUIDs] arrayByAddingObject: __child]];
    }
    else {
      [self setNetworkUUIDs: [NSArray arrayWithObject: __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 "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"


  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 "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"


  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 domainUUID]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_id", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}domain_id."];
    }

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subnet."];
    }
  }
  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 subnetType]) {
    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
    [[self subnetType] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}type...");
#endif

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

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

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

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}network_ids."];
      }
    } //end item iterator.
  }
  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 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."];
    }
  }
  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 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."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveSubnet (JAXB) */

#endif /* DEF_FULLNS0OpenDoveSubnet_M */
#ifndef DEF_FULLNS0OpenDovePolicy_M
#define DEF_FULLNS0OpenDovePolicy_M

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

/**
 * (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)
 */
- (BOOL *) tombstoneFlag
{
  return _tombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (void) setTombstoneFlag: (BOOL *) newTombstoneFlag
{
  if (_tombstoneFlag != NULL) {
    free(_tombstoneFlag);
  }
  _tombstoneFlag = newTombstoneFlag;
}

/**
 * (no documentation provided)
 */
- (int *) policyType
{
  return _policyType;
}

/**
 * (no documentation provided)
 */
- (void) setPolicyType: (int *) newPolicyType
{
  if (_policyType != NULL) {
    free(_policyType);
  }
  _policyType = newPolicyType;
}

/**
 * (no documentation provided)
 */
- (int *) policyAction
{
  return _policyAction;
}

/**
 * (no documentation provided)
 */
- (void) setPolicyAction: (int *) newPolicyAction
{
  if (_policyAction != NULL) {
    free(_policyAction);
  }
  _policyAction = newPolicyAction;
}

/**
 * (no documentation provided)
 */
- (int *) trafficType
{
  return _trafficType;
}

/**
 * (no documentation provided)
 */
- (void) setTrafficType: (int *) newTrafficType
{
  if (_trafficType != NULL) {
    free(_trafficType);
  }
  _trafficType = newTrafficType;
}

/**
 * (no documentation provided)
 */
- (int *) sourceVNID
{
  return _sourceVNID;
}

/**
 * (no documentation provided)
 */
- (void) setSourceVNID: (int *) newSourceVNID
{
  if (_sourceVNID != NULL) {
    free(_sourceVNID);
  }
  _sourceVNID = newSourceVNID;
}

/**
 * (no documentation provided)
 */
- (int *) timeToLive
{
  return _timeToLive;
}

/**
 * (no documentation provided)
 */
- (void) setTimeToLive: (int *) newTimeToLive
{
  if (_timeToLive != NULL) {
    free(_timeToLive);
  }
  _timeToLive = newTimeToLive;
}

/**
 * (no documentation provided)
 */
- (int *) destinationVNID
{
  return _destinationVNID;
}

/**
 * (no documentation provided)
 */
- (void) setDestinationVNID: (int *) newDestinationVNID
{
  if (_destinationVNID != NULL) {
    free(_destinationVNID);
  }
  _destinationVNID = newDestinationVNID;
}

/**
 * (no documentation provided)
 */
- (NSString *) domainUUID
{
  return _domainUUID;
}

/**
 * (no documentation provided)
 */
- (void) setDomainUUID: (NSString *) newDomainUUID
{
  [newDomainUUID retain];
  [_domainUUID release];
  _domainUUID = newDomainUUID;
}

/**
 * (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 setTombstoneFlag: NULL];
  [self setPolicyType: NULL];
  [self setPolicyAction: NULL];
  [self setTrafficType: NULL];
  [self setSourceVNID: NULL];
  [self setTimeToLive: NULL];
  [self setDestinationVNID: NULL];
  [self setDomainUUID: nil];
  [self setUuid: nil];
  [super dealloc];
}

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

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

//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 FULLNS0OpenDovePolicy */

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

@end /*interface FULLNS0OpenDovePolicy (JAXB)*/

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

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

  [_fULLNS0OpenDovePolicy autorelease];
  return _fULLNS0OpenDovePolicy;
}

/**
 * Initialize this instance of FULLNS0OpenDovePolicy 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 FULLNS0OpenDovePolicy 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 FULLNS0OpenDovePolicy from an XML reader. The element to be read is
 * "openDovePolicy".
 *
 * @param reader The XML reader.
 * @return The FULLNS0OpenDovePolicy.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  FULLNS0OpenDovePolicy *_openDovePolicy = 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 openDovePolicy."];
    }
  }

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

  return _openDovePolicy;
}

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

/**
 * Writes this FULLNS0OpenDovePolicy 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 "openDovePolicy", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}openDovePolicy. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}openDovePolicy for root element {}openDovePolicy...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}openDovePolicy for root element {}openDovePolicy...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}openDovePolicy. 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 "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 "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 setPolicyType: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "action", 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 setPolicyAction: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "traffic_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 setTrafficType: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "src_network", 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 setSourceVNID: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "ttl", 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 setTimeToLive: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dst_network", 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 setDestinationVNID: ((int*) _child_accessor)];
    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 setDomainUUID: __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 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 policyType] != 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 policyType]);
#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 policyAction] != NULL) {
    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
    status = xmlTextWriterWriteIntType(writer, [self policyAction]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}action...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}action."];
    }

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

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

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

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

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dst_network."];
    }
  }
  if ([self domainUUID]) {
    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 domainUUID] 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 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 FULLNS0OpenDovePolicy (JAXB) */

#endif /* DEF_FULLNS0OpenDovePolicy_M */
#ifndef DEF_FULLNS0OpenDoveNetwork_M
#define DEF_FULLNS0OpenDoveNetwork_M

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

/**
 * (no documentation provided)
 */
- (int *) networkType
{
  return _networkType;
}

/**
 * (no documentation provided)
 */
- (void) setNetworkType: (int *) newNetworkType
{
  if (_networkType != NULL) {
    free(_networkType);
  }
  _networkType = newNetworkType;
}

/**
 * (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 *) 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)
 */
- (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)
 */
- (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)
 */
- (int *) vnid
{
  return _vnid;
}

/**
 * (no documentation provided)
 */
- (void) setVnid: (int *) newVnid
{
  if (_vnid != NULL) {
    free(_vnid);
  }
  _vnid = newVnid;
}

- (void) dealloc
{
  [self setNetworkType: NULL];
  [self setTombstoneFlag: NULL];
  [self setUuid: nil];
  [self setLastChangeVersion: NULL];
  [self setDomain_uuid: nil];
  [self setName: nil];
  [self setCreateVersion: NULL];
  [self setVnid: 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 "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 "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 "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 "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 "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 "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;
  }

  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 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 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 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 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 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 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."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveNetwork (JAXB) */

#endif /* DEF_FULLNS0OpenDoveNetwork_M */
#ifndef DEF_FULLNS0OpenDoveDomain_M
#define DEF_FULLNS0OpenDoveDomain_M

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

/**
 * (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)
 */
- (NSString *) uuid
{
  return _uuid;
}

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

/**
 * (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)
 */
- (NSString *) name
{
  return _name;
}

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

- (void) dealloc
{
  [self setLastChangeVersion: NULL];
  [self setCreateVersion: NULL];
  [self setUuid: nil];
  [self setTombstoneFlag: NULL];
  [self setReplicationFactor: NULL];
  [self setName: 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 "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 "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 "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 "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"


  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 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 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 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."];
    }
  }
}
@end /* implementation FULLNS0OpenDoveDomain (JAXB) */

#endif /* DEF_FULLNS0OpenDoveDomain_M */
