#import "mysmsapi.h"
#ifndef DEF_MYSMSAPINS0Response_M
#define DEF_MYSMSAPINS0Response_M

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

/**
 * The error code or zero if their was no error
 */
- (int) errorCode
{
  return _errorCode;
}

/**
 * The error code or zero if their was no error
 */
- (void) setErrorCode: (int) newErrorCode
{
  _errorCode = newErrorCode;
}

- (void) dealloc
{
  [super dealloc];
}
@end /* implementation MYSMSAPINS0Response */

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

@end /*interface MYSMSAPINS0Response (JAXB)*/

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

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

  [_mYSMSAPINS0Response autorelease];
  return _mYSMSAPINS0Response;
}

/**
 * Initialize this instance of MYSMSAPINS0Response 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 MYSMSAPINS0Response 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];
}

//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 "errorCode", 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 setErrorCode: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "errorCode", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}errorCode."];
    }

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

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

#endif /* DEF_MYSMSAPINS0Response_M */
#ifndef DEF_MYSMSAPINS0AmazonS3Upload_M
#define DEF_MYSMSAPINS0AmazonS3Upload_M

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

/**
 * the amazon s3 aws access key id
 */
- (NSString *) awsAccessKeyId
{
  return _awsAccessKeyId;
}

/**
 * the amazon s3 aws access key id
 */
- (void) setAwsAccessKeyId: (NSString *) newAwsAccessKeyId
{
  [newAwsAccessKeyId retain];
  [_awsAccessKeyId release];
  _awsAccessKeyId = newAwsAccessKeyId;
}

/**
 * the amazon s3 upload bucket name
 */
- (NSString *) bucketName
{
  return _bucketName;
}

/**
 * the amazon s3 upload bucket name
 */
- (void) setBucketName: (NSString *) newBucketName
{
  [newBucketName retain];
  [_bucketName release];
  _bucketName = newBucketName;
}

/**
 * the amazon s3 upload key
 */
- (NSString *) key
{
  return _key;
}

/**
 * the amazon s3 upload key
 */
- (void) setKey: (NSString *) newKey
{
  [newKey retain];
  [_key release];
  _key = newKey;
}

/**
 * the amazon s3 upload acl
 */
- (NSString *) acl
{
  return _acl;
}

/**
 * the amazon s3 upload acl
 */
- (void) setAcl: (NSString *) newAcl
{
  [newAcl retain];
  [_acl release];
  _acl = newAcl;
}

/**
 * the amazon s3 upload content type
 */
- (NSString *) contentType
{
  return _contentType;
}

/**
 * the amazon s3 upload content type
 */
- (void) setContentType: (NSString *) newContentType
{
  [newContentType retain];
  [_contentType release];
  _contentType = newContentType;
}

/**
 * the amazon s3 upload content disposition
 */
- (NSString *) contentDisposition
{
  return _contentDisposition;
}

/**
 * the amazon s3 upload content disposition
 */
- (void) setContentDisposition: (NSString *) newContentDisposition
{
  [newContentDisposition retain];
  [_contentDisposition release];
  _contentDisposition = newContentDisposition;
}

/**
 * the amazon s3 upload content type
 */
- (NSString *) storageClass
{
  return _storageClass;
}

/**
 * the amazon s3 upload content type
 */
- (void) setStorageClass: (NSString *) newStorageClass
{
  [newStorageClass retain];
  [_storageClass release];
  _storageClass = newStorageClass;
}

/**
 * the amazon s3 upload policy
 */
- (NSString *) policy
{
  return _policy;
}

/**
 * the amazon s3 upload policy
 */
- (void) setPolicy: (NSString *) newPolicy
{
  [newPolicy retain];
  [_policy release];
  _policy = newPolicy;
}

/**
 * the amazon s3 upload signature
 */
- (NSString *) signature
{
  return _signature;
}

/**
 * the amazon s3 upload signature
 */
- (void) setSignature: (NSString *) newSignature
{
  [newSignature retain];
  [_signature release];
  _signature = newSignature;
}

- (void) dealloc
{
  [self setAwsAccessKeyId: nil];
  [self setBucketName: nil];
  [self setKey: nil];
  [self setAcl: nil];
  [self setContentType: nil];
  [self setContentDisposition: nil];
  [self setStorageClass: nil];
  [self setPolicy: nil];
  [self setSignature: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0AmazonS3Upload */

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

@end /*interface MYSMSAPINS0AmazonS3Upload (JAXB)*/

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

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

  [_mYSMSAPINS0AmazonS3Upload autorelease];
  return _mYSMSAPINS0AmazonS3Upload;
}

/**
 * Initialize this instance of MYSMSAPINS0AmazonS3Upload 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 MYSMSAPINS0AmazonS3Upload 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];
}

//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 "awsAccessKeyId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    [self setSignature: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0AmazonS3Upload_M */
#ifndef DEF_MYSMSAPINS0AttachmentPart_M
#define DEF_MYSMSAPINS0AttachmentPart_M

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

/**
 * The part id of the attachment
 */
- (int) partId
{
  return _partId;
}

/**
 * The part id of the attachment
 */
- (void) setPartId: (int) newPartId
{
  _partId = newPartId;
}

/**
 * The type id of the attachment
 * 
 * <table>
 * <tr><th>type id</th><th>description</th><th>preview</th></tr>
 * <tr><td>0</td><td>any file</td><td>no</td></tr>
 * <tr><td>1</td><td>image jpeg</td><td>yes</td></tr>
 * <tr><td>2</td><td>image png</td><td>yes</td></tr>
 * </table>
 */
- (int) typeId
{
  return _typeId;
}

/**
 * The type id of the attachment
 * 
 * <table>
 * <tr><th>type id</th><th>description</th><th>preview</th></tr>
 * <tr><td>0</td><td>any file</td><td>no</td></tr>
 * <tr><td>1</td><td>image jpeg</td><td>yes</td></tr>
 * <tr><td>2</td><td>image png</td><td>yes</td></tr>
 * </table>
 */
- (void) setTypeId: (int) newTypeId
{
  _typeId = newTypeId;
}

/**
 * The file name of the attachment part
 */
- (NSString *) fileName
{
  return _fileName;
}

/**
 * The file name of the attachment part
 */
- (void) setFileName: (NSString *) newFileName
{
  [newFileName retain];
  [_fileName release];
  _fileName = newFileName;
}

/**
 * The file size of the attachment part
 * 
 * The maximal file size is 20Mb.
 */
- (int) fileSize
{
  return _fileSize;
}

/**
 * The file size of the attachment part
 * 
 * The maximal file size is 20Mb.
 */
- (void) setFileSize: (int) newFileSize
{
  _fileSize = newFileSize;
}

/**
 * The properties which depends on the type in json format.
 */
- (NSString *) properties
{
  return _properties;
}

/**
 * The properties which depends on the type in json format.
 */
- (void) setProperties: (NSString *) newProperties
{
  [newProperties retain];
  [_properties release];
  _properties = newProperties;
}

/**
 * The url of the attachment part.
 */
- (NSString *) url
{
  return _url;
}

/**
 * The url of the attachment part.
 */
- (void) setUrl: (NSString *) newUrl
{
  [newUrl retain];
  [_url release];
  _url = newUrl;
}

/**
 * The preview url of the attachment part if no preview is available it will be null.
 */
- (NSString *) previewUrl
{
  return _previewUrl;
}

/**
 * The preview url of the attachment part if no preview is available it will be null.
 */
- (void) setPreviewUrl: (NSString *) newPreviewUrl
{
  [newPreviewUrl retain];
  [_previewUrl release];
  _previewUrl = newPreviewUrl;
}

- (void) dealloc
{
  [self setFileName: nil];
  [self setProperties: nil];
  [self setUrl: nil];
  [self setPreviewUrl: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0AttachmentPart */

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

@end /*interface MYSMSAPINS0AttachmentPart (JAXB)*/

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

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

  [_mYSMSAPINS0AttachmentPart autorelease];
  return _mYSMSAPINS0AttachmentPart;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentPart 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 MYSMSAPINS0AttachmentPart 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];
}

//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 "partId", 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 setPartId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "typeId", 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 setTypeId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "fileName", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "fileSize", 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 setFileSize: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "properties", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

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

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

    [self setPreviewUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "partId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}partId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}partId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "typeId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}typeId."];
    }

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}fileName."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fileSize", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}fileSize."];
    }

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0AttachmentPart_M */
#ifndef DEF_MYSMSAPINS0ConfigCountry_M
#define DEF_MYSMSAPINS0ConfigCountry_M

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

/**
 * the unique identifier
 */
- (int) identifier
{
  return _identifier;
}

/**
 * the unique identifier
 */
- (void) setIdentifier: (int) newIdentifier
{
  _identifier = newIdentifier;
}

/**
 * the iso country code "http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"
 */
- (NSString *) code
{
  return _code;
}

/**
 * the iso country code "http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"
 */
- (void) setCode: (NSString *) newCode
{
  [newCode retain];
  [_code release];
  _code = newCode;
}

/**
 * the iso currency code "http://en.wikipedia.org/wiki/ISO_currency_code"
 */
- (NSString *) currency
{
  return _currency;
}

/**
 * the iso currency code "http://en.wikipedia.org/wiki/ISO_currency_code"
 */
- (void) setCurrency: (NSString *) newCurrency
{
  [newCurrency retain];
  [_currency release];
  _currency = newCurrency;
}

/**
 * the dial prefix "http://en.wikipedia.org/wiki/List_of_country_calling_codes"
 */
- (int) dialPrefix
{
  return _dialPrefix;
}

/**
 * the dial prefix "http://en.wikipedia.org/wiki/List_of_country_calling_codes"
 */
- (void) setDialPrefix: (int) newDialPrefix
{
  _dialPrefix = newDialPrefix;
}

/**
 * the number valid regular expression
 */
- (NSString *) numberValidRegex
{
  return _numberValidRegex;
}

/**
 * the number valid regular expression
 */
- (void) setNumberValidRegex: (NSString *) newNumberValidRegex
{
  [newNumberValidRegex retain];
  [_numberValidRegex release];
  _numberValidRegex = newNumberValidRegex;
}

/**
 * the loginEnabled
 */
- (BOOL) loginEnabled
{
  return _loginEnabled;
}

/**
 * the loginEnabled
 */
- (void) setLoginEnabled: (BOOL) newLoginEnabled
{
  _loginEnabled = newLoginEnabled;
}

/**
 * the smsEnabled
 */
- (BOOL) smsEnabled
{
  return _smsEnabled;
}

/**
 * the smsEnabled
 */
- (void) setSmsEnabled: (BOOL) newSmsEnabled
{
  _smsEnabled = newSmsEnabled;
}

/**
 * the registration free sms
 */
- (int) registrationFreeSms
{
  return _registrationFreeSms;
}

/**
 * the registration free sms
 */
- (void) setRegistrationFreeSms: (int) newRegistrationFreeSms
{
  _registrationFreeSms = newRegistrationFreeSms;
}

/**
 * the recipient address for incoming system sms
 */
- (NSString *) smsRecipientAddress
{
  return _smsRecipientAddress;
}

/**
 * the recipient address for incoming system sms
 */
- (void) setSmsRecipientAddress: (NSString *) newSmsRecipientAddress
{
  [newSmsRecipientAddress retain];
  [_smsRecipientAddress release];
  _smsRecipientAddress = newSmsRecipientAddress;
}

/**
 * the recipient address for incoming system sms on cdma networks
 */
- (NSString *) smsRecipientAddressCdma
{
  return _smsRecipientAddressCdma;
}

/**
 * the recipient address for incoming system sms on cdma networks
 */
- (void) setSmsRecipientAddressCdma: (NSString *) newSmsRecipientAddressCdma
{
  [newSmsRecipientAddressCdma retain];
  [_smsRecipientAddressCdma release];
  _smsRecipientAddressCdma = newSmsRecipientAddressCdma;
}

/**
 * the registration mode bit mask
 * 
 * 0 .. No registration
 * 1 .. SMS mobile terminated only
 * 2 .. Voice only
 * 3 .. SMS mobile terminated + Voice as fallback
 * 4 .. SMS mobile originated
 * 5 .. SMS mobile terminated + SMS mobile originated as fallback
 */
- (int) registrationMode
{
  return _registrationMode;
}

/**
 * the registration mode bit mask
 * 
 * 0 .. No registration
 * 1 .. SMS mobile terminated only
 * 2 .. Voice only
 * 3 .. SMS mobile terminated + Voice as fallback
 * 4 .. SMS mobile originated
 * 5 .. SMS mobile terminated + SMS mobile originated as fallback
 */
- (void) setRegistrationMode: (int) newRegistrationMode
{
  _registrationMode = newRegistrationMode;
}

- (void) dealloc
{
  [self setCode: nil];
  [self setCurrency: nil];
  [self setNumberValidRegex: nil];
  [self setSmsRecipientAddress: nil];
  [self setSmsRecipientAddressCdma: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0ConfigCountry */

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

@end /*interface MYSMSAPINS0ConfigCountry (JAXB)*/

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

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

  [_mYSMSAPINS0ConfigCountry autorelease];
  return _mYSMSAPINS0ConfigCountry;
}

/**
 * Initialize this instance of MYSMSAPINS0ConfigCountry 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 MYSMSAPINS0ConfigCountry 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];
}

//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 "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 setIdentifier: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "code", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dialPrefix", 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 setDialPrefix: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "numberValidRegex", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "registrationFreeSms", 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 setRegistrationFreeSms: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsRecipientAddress", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "registrationMode", 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 setRegistrationMode: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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
    status = xmlTextWriterWriteIntType(writer, &_identifier);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}id."];
    }

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}currency."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dialPrefix", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dialPrefix."];
    }

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}numberValidRegex."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "loginEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}loginEnabled."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}loginEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsEnabled."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "registrationFreeSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}registrationFreeSms."];
    }

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

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsRecipientAddressCdma."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "registrationMode", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}registrationMode."];
    }

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

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

#endif /* DEF_MYSMSAPINS0ConfigCountry_M */
#ifndef DEF_MYSMSAPINS0Group_M
#define DEF_MYSMSAPINS0Group_M

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

/**
 * The id of the group
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The id of the group
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

/**
 * The name of the group
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the group
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The amount of users in the group
 */
- (int) users
{
  return _users;
}

/**
 * The amount of users in the group
 */
- (void) setUsers: (int) newUsers
{
  _users = newUsers;
}

- (void) dealloc
{
  [self setName: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0Group */

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

@end /*interface MYSMSAPINS0Group (JAXB)*/

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

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

  [_mYSMSAPINS0Group autorelease];
  return _mYSMSAPINS0Group;
}

/**
 * Initialize this instance of MYSMSAPINS0Group 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 MYSMSAPINS0Group 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];
}

//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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "users", 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 setUsers: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
  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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "users", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}users."];
    }

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

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

#endif /* DEF_MYSMSAPINS0Group_M */
#ifndef DEF_MYSMSAPINS0ShopPaymentMethod_M
#define DEF_MYSMSAPINS0ShopPaymentMethod_M

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

/**
 * The payment method id
 */
- (int) identifier
{
  return _identifier;
}

/**
 * The payment method id
 */
- (void) setIdentifier: (int) newIdentifier
{
  _identifier = newIdentifier;
}

/**
 * The name of the payment method
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the payment method
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * Does the payment method requires additional user input
 */
- (BOOL) interactive
{
  return _interactive;
}

/**
 * Does the payment method requires additional user input
 */
- (void) setInteractive: (BOOL) newInteractive
{
  _interactive = newInteractive;
}

- (void) dealloc
{
  [self setName: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0ShopPaymentMethod */

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

@end /*interface MYSMSAPINS0ShopPaymentMethod (JAXB)*/

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

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

  [_mYSMSAPINS0ShopPaymentMethod autorelease];
  return _mYSMSAPINS0ShopPaymentMethod;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopPaymentMethod 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 MYSMSAPINS0ShopPaymentMethod 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];
}

//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 "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 setIdentifier: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "interactive", 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 setInteractive: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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
    status = xmlTextWriterWriteIntType(writer, &_identifier);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}id."];
    }

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

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

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

#endif /* DEF_MYSMSAPINS0ShopPaymentMethod_M */
#ifndef DEF_MYSMSAPINS0SmsConnector_M
#define DEF_MYSMSAPINS0SmsConnector_M

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

/**
 * The sms connector unique id
 */
- (int) smsConnectorId
{
  return _smsConnectorId;
}

/**
 * The sms connector unique id
 */
- (void) setSmsConnectorId: (int) newSmsConnectorId
{
  _smsConnectorId = newSmsConnectorId;
}

/**
 * The package name of the sms connector
 */
- (NSString *) packageName
{
  return _packageName;
}

/**
 * The package name of the sms connector
 */
- (void) setPackageName: (NSString *) newPackageName
{
  [newPackageName retain];
  [_packageName release];
  _packageName = newPackageName;
}

/**
 * The sub connector id of the sms connector or null if this is no sub connector.
 */
- (NSString *) subConnectorId
{
  return _subConnectorId;
}

/**
 * The sub connector id of the sms connector or null if this is no sub connector.
 */
- (void) setSubConnectorId: (NSString *) newSubConnectorId
{
  [newSubConnectorId retain];
  [_subConnectorId release];
  _subConnectorId = newSubConnectorId;
}

/**
 * The display name of the sms connector
 */
- (NSString *) name
{
  return _name;
}

/**
 * The display name of the sms connector
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The indication color of the sms connector
 */
- (int) color
{
  return _color;
}

/**
 * The indication color of the sms connector
 */
- (void) setColor: (int) newColor
{
  _color = newColor;
}

/**
 * The maximum sms length of the sms connector
 */
- (int) maxLength
{
  return _maxLength;
}

/**
 * The maximum sms length of the sms connector
 */
- (void) setMaxLength: (int) newMaxLength
{
  _maxLength = newMaxLength;
}

/**
 * The maximum sms recipients per sms for this connector
 */
- (int) maxRecipients
{
  return _maxRecipients;
}

/**
 * The maximum sms recipients per sms for this connector
 */
- (void) setMaxRecipients: (int) newMaxRecipients
{
  _maxRecipients = newMaxRecipients;
}

/**
 * A bit mask with possible sms encodings for this connector
 * 
 * bit 1 .. 7bit
 * bit 2 .. 8bit
 * bit 3 .. ucs2
 */
- (int) encodings
{
  return _encodings;
}

/**
 * A bit mask with possible sms encodings for this connector
 * 
 * bit 1 .. 7bit
 * bit 2 .. 8bit
 * bit 3 .. ucs2
 */
- (void) setEncodings: (int) newEncodings
{
  _encodings = newEncodings;
}

/**
 * The allowed recipient regex (i.e. for austria only: "43(650|676|660|664|669)") or null if their is no restriction.
 */
- (NSString *) recipientRegex
{
  return _recipientRegex;
}

/**
 * The allowed recipient regex (i.e. for austria only: "43(650|676|660|664|669)") or null if their is no restriction.
 */
- (void) setRecipientRegex: (NSString *) newRecipientRegex
{
  [newRecipientRegex retain];
  [_recipientRegex release];
  _recipientRegex = newRecipientRegex;
}

/**
 * The flag that indicates if the connector is popular
 */
- (BOOL) popular
{
  return _popular;
}

/**
 * The flag that indicates if the connector is popular
 */
- (void) setPopular: (BOOL) newPopular
{
  _popular = newPopular;
}

- (void) dealloc
{
  [self setPackageName: nil];
  [self setSubConnectorId: nil];
  [self setName: nil];
  [self setRecipientRegex: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0SmsConnector */

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

@end /*interface MYSMSAPINS0SmsConnector (JAXB)*/

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

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

  [_mYSMSAPINS0SmsConnector autorelease];
  return _mYSMSAPINS0SmsConnector;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsConnector 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 MYSMSAPINS0SmsConnector 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];
}

//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 "smsConnectorId", 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 setSmsConnectorId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "packageName", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

    [self setSubConnectorId: __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 "color", 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 setColor: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "encodings", 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 setEncodings: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "recipientRegex", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "popular", 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 setPopular: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnectorId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnectorId."];
    }

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

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subConnectorId."];
    }
  }
  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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "color", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}color."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}color."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxLength", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxLength."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxLength."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxRecipients", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxRecipients."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxRecipients."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "encodings", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}encodings."];
    }

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipientRegex."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "popular", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}popular."];
    }

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

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

#endif /* DEF_MYSMSAPINS0SmsConnector_M */
#ifndef DEF_MYSMSAPINS0SmsSendAck_M
#define DEF_MYSMSAPINS0SmsSendAck_M

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

/**
 * The msisdn of the recipient
 */
- (long long) recipient
{
  return _recipient;
}

/**
 * The msisdn of the recipient
 */
- (void) setRecipient: (long long) newRecipient
{
  _recipient = newRecipient;
}

/**
 * The (server) message id for the message if one was created.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id for the message if one was created.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}
@end /* implementation MYSMSAPINS0SmsSendAck */

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

@end /*interface MYSMSAPINS0SmsSendAck (JAXB)*/

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

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

  [_mYSMSAPINS0SmsSendAck autorelease];
  return _mYSMSAPINS0SmsSendAck;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsSendAck 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 MYSMSAPINS0SmsSendAck 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];
}

//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 "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipient."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0SmsSendAck_M */
#ifndef DEF_MYSMSAPINS0UserCall_M
#define DEF_MYSMSAPINS0UserCall_M

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

/**
 * The call id of the call.
 */
- (int) callId
{
  return _callId;
}

/**
 * The call id of the call.
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

/**
 * The address of the conversation.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the conversation.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The state of the direction of the call.
 */
- (BOOL) incoming
{
  return _incoming;
}

/**
 * The state of the direction of the call.
 */
- (void) setIncoming: (BOOL) newIncoming
{
  _incoming = newIncoming;
}

/**
 * True if the call was already read otherwise the call is unread.
 */
- (BOOL) read
{
  return _read;
}

/**
 * True if the call was already read otherwise the call is unread.
 */
- (void) setRead: (BOOL) newRead
{
  _read = newRead;
}

/**
 * The duration of the call in seconds
 */
- (int) duration
{
  return _duration;
}

/**
 * The duration of the call in seconds
 */
- (void) setDuration: (int) newDuration
{
  _duration = newDuration;
}

/**
 * The origin of the call.
 * <br/>
 * 0 .. ringing<br/>
 * 1 .. active<br/>
 * 2 .. complete<br/>
 * 3 .. missed<br/>
 */
- (int) status
{
  return _status;
}

/**
 * The origin of the call.
 * <br/>
 * 0 .. ringing<br/>
 * 1 .. active<br/>
 * 2 .. complete<br/>
 * 3 .. missed<br/>
 */
- (void) setStatus: (int) newStatus
{
  _status = newStatus;
}

/**
 * The date of the call.
 */
- (NSDate *) dateCall
{
  return _dateCall;
}

/**
 * The date of the call.
 */
- (void) setDateCall: (NSDate *) newDateCall
{
  [newDateCall retain];
  [_dateCall release];
  _dateCall = newDateCall;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setDateCall: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserCall */

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

@end /*interface MYSMSAPINS0UserCall (JAXB)*/

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

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

  [_mYSMSAPINS0UserCall autorelease];
  return _mYSMSAPINS0UserCall;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCall 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 MYSMSAPINS0UserCall 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];
}

//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 "callId", 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 setCallId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


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

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateCall", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setDateCall: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "incoming", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}incoming."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}incoming."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "read", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}read."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}read."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "duration", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}duration."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}duration."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserCall_M */
#ifndef DEF_MYSMSAPINS0UserContactOverride_M
#define DEF_MYSMSAPINS0UserContactOverride_M

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

/**
 * The msisdn of the contact.
 */
- (NSString *) msisdn
{
  return _msisdn;
}

/**
 * The msisdn of the contact.
 */
- (void) setMsisdn: (NSString *) newMsisdn
{
  [newMsisdn retain];
  [_msisdn release];
  _msisdn = newMsisdn;
}

/**
 * The name of the contact or null if there is no override configured.
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the contact or null if there is no override configured.
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The avatar index. Zero means no override.
 */
- (int) avatar
{
  return _avatar;
}

/**
 * The avatar index. Zero means no override.
 */
- (void) setAvatar: (int) newAvatar
{
  _avatar = newAvatar;
}

- (void) dealloc
{
  [self setMsisdn: nil];
  [self setName: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserContactOverride */

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

@end /*interface MYSMSAPINS0UserContactOverride (JAXB)*/

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

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

  [_mYSMSAPINS0UserContactOverride autorelease];
  return _mYSMSAPINS0UserContactOverride;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactOverride 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 MYSMSAPINS0UserContactOverride 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];
}

//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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setMsisdn: __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 "avatar", 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 setAvatar: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "avatar", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}avatar."];
    }

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

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

#endif /* DEF_MYSMSAPINS0UserContactOverride_M */
#ifndef DEF_MYSMSAPINS0UserMessageConversation_M
#define DEF_MYSMSAPINS0UserMessageConversation_M

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

/**
 * The address of the conversation.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the conversation.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The snippet of the last message in the conversation.
 */
- (NSString *) snippet
{
  return _snippet;
}

/**
 * The snippet of the last message in the conversation.
 */
- (void) setSnippet: (NSString *) newSnippet
{
  [newSnippet retain];
  [_snippet release];
  _snippet = newSnippet;
}

/**
 * The number of unread messages in this conversation.
 */
- (int) messagesUnread
{
  return _messagesUnread;
}

/**
 * The number of unread messages in this conversation.
 */
- (void) setMessagesUnread: (int) newMessagesUnread
{
  _messagesUnread = newMessagesUnread;
}

/**
 * The number of unsent messages in this conversation.
 */
- (int) messagesUnsent
{
  return _messagesUnsent;
}

/**
 * The number of unsent messages in this conversation.
 */
- (void) setMessagesUnsent: (int) newMessagesUnsent
{
  _messagesUnsent = newMessagesUnsent;
}

/**
 * The number of messages in this conversation.
 */
- (int) messages
{
  return _messages;
}

/**
 * The number of messages in this conversation.
 */
- (void) setMessages: (int) newMessages
{
  _messages = newMessages;
}

/**
 * The highest message id.
 */
- (int) maxMessageId
{
  return _maxMessageId;
}

/**
 * The highest message id.
 */
- (void) setMaxMessageId: (int) newMaxMessageId
{
  _maxMessageId = newMaxMessageId;
}

/**
 * The date of the last messages in this conversation.
 */
- (NSDate *) dateLastMessage
{
  return _dateLastMessage;
}

/**
 * The date of the last messages in this conversation.
 */
- (void) setDateLastMessage: (NSDate *) newDateLastMessage
{
  [newDateLastMessage retain];
  [_dateLastMessage release];
  _dateLastMessage = newDateLastMessage;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setSnippet: nil];
  [self setDateLastMessage: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserMessageConversation */

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

@end /*interface MYSMSAPINS0UserMessageConversation (JAXB)*/

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

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

  [_mYSMSAPINS0UserMessageConversation autorelease];
  return _mYSMSAPINS0UserMessageConversation;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageConversation 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 MYSMSAPINS0UserMessageConversation 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];
}

//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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


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

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "maxMessageId", 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 setMaxMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateLastMessage", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setDateLastMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}snippet."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messagesUnread", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messagesUnread."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messagesUnread."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messagesUnsent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messagesUnsent."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messagesUnsent."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messages", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messages."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messages."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxMessageId."];
    }

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserMessageConversation_M */
#ifndef DEF_MYSMSAPINS0UserMessageMessage_M
#define DEF_MYSMSAPINS0UserMessageMessage_M

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

/**
 * The message id of the message.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The message id of the message.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * The address of the message.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the message.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The message text of the message.
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message text of the message.
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The state of the direction of the message.
 */
- (BOOL) incoming
{
  return _incoming;
}

/**
 * The state of the direction of the message.
 */
- (void) setIncoming: (BOOL) newIncoming
{
  _incoming = newIncoming;
}

/**
 * True if the message was already read otherwise the message is unread.
 */
- (BOOL) read
{
  return _read;
}

/**
 * True if the message was already read otherwise the message is unread.
 */
- (void) setRead: (BOOL) newRead
{
  _read = newRead;
}

/**
 * True if the message is locked otherwise the message is unlocked.
 */
- (BOOL) locked
{
  return _locked;
}

/**
 * True if the message is locked otherwise the message is unlocked.
 */
- (void) setLocked: (BOOL) newLocked
{
  _locked = newLocked;
}

/**
 * The origin of the message.
 * <br/><br/>
 * 0 .. sim<br/>
 * 1 .. mysms<br/>
 * 2 .. a2a (account 2 account)<br/>
 * or a sms connector id<br/>
 */
- (int) origin
{
  return _origin;
}

/**
 * The origin of the message.
 * <br/><br/>
 * 0 .. sim<br/>
 * 1 .. mysms<br/>
 * 2 .. a2a (account 2 account)<br/>
 * or a sms connector id<br/>
 */
- (void) setOrigin: (int) newOrigin
{
  _origin = newOrigin;
}

/**
 * The origin of the message.
 * <br/><br/>
 * 0 .. none<br/>
 * 1 .. pending<br/>
 * 2 .. completed<br/>
 * 3 .. failed<br/>
 * 4 .. sending<br/>
 * 5 .. unsent<br/>
 */
- (int) status
{
  return _status;
}

/**
 * The origin of the message.
 * <br/><br/>
 * 0 .. none<br/>
 * 1 .. pending<br/>
 * 2 .. completed<br/>
 * 3 .. failed<br/>
 * 4 .. sending<br/>
 * 5 .. unsent<br/>
 */
- (void) setStatus: (int) newStatus
{
  _status = newStatus;
}

/**
 * The date of the message.
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date of the message.
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

/**
 * Optional date for the specific status.
 * <br/><br/>
 * completed .. the date when the message was received by the recipient<br/>
 * sending .. the date when the message will be sent<br/>
 */
- (NSDate *) dateStatus
{
  return _dateStatus;
}

/**
 * Optional date for the specific status.
 * <br/><br/>
 * completed .. the date when the message was received by the recipient<br/>
 * sending .. the date when the message will be sent<br/>
 */
- (void) setDateStatus: (NSDate *) newDateStatus
{
  [newDateStatus retain];
  [_dateStatus release];
  _dateStatus = newDateStatus;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setMessage: nil];
  [self setDateSent: nil];
  [self setDateStatus: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserMessageMessage */

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

@end /*interface MYSMSAPINS0UserMessageMessage (JAXB)*/

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

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

  [_mYSMSAPINS0UserMessageMessage autorelease];
  return _mYSMSAPINS0UserMessageMessage;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageMessage 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 MYSMSAPINS0UserMessageMessage 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];
}

//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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


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

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

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

    [self setDateStatus: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

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

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "incoming", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}incoming."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}incoming."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "read", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}read."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}read."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "locked", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}locked."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}locked."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "origin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}origin."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}origin."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserMessageMessage_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnector_M
#define DEF_MYSMSAPINS0UserSmsConnector_M

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

/**
 * The sms connector id. For sim sms connector this is zero.
 */
- (int) smsConnectorId
{
  return _smsConnectorId;
}

/**
 * The sms connector id. For sim sms connector this is zero.
 */
- (void) setSmsConnectorId: (int) newSmsConnectorId
{
  _smsConnectorId = newSmsConnectorId;
}

/**
 * The name of the connector (in client's language)
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the connector (in client's language)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The priority for national sms
 */
- (int) priorityNational
{
  return _priorityNational;
}

/**
 * The priority for national sms
 */
- (void) setPriorityNational: (int) newPriorityNational
{
  _priorityNational = newPriorityNational;
}

/**
 * The priority for foreign sms
 */
- (int) priorityForeign
{
  return _priorityForeign;
}

/**
 * The priority for foreign sms
 */
- (void) setPriorityForeign: (int) newPriorityForeign
{
  _priorityForeign = newPriorityForeign;
}

- (void) dealloc
{
  [self setName: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserSmsConnector */

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

@end /*interface MYSMSAPINS0UserSmsConnector (JAXB)*/

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

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

  [_mYSMSAPINS0UserSmsConnector autorelease];
  return _mYSMSAPINS0UserSmsConnector;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnector 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 MYSMSAPINS0UserSmsConnector 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];
}

//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 "smsConnectorId", 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 setSmsConnectorId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "priorityForeign", 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 setPriorityForeign: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnectorId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnectorId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsConnectorId."];
    }
  }
  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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "priorityNational", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}priorityNational."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}priorityNational."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "priorityForeign", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}priorityForeign."];
    }

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

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

#endif /* DEF_MYSMSAPINS0UserSmsConnector_M */
#ifndef DEF_MYSMSAPINS0UserMessageSyncAck_M
#define DEF_MYSMSAPINS0UserMessageSyncAck_M

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

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The (server) message id for the message.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id for the message.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * The device message id for the message.
 */
- (int) deviceMessageId
{
  return _deviceMessageId;
}

/**
 * The device message id for the message.
 */
- (void) setDeviceMessageId: (int) newDeviceMessageId
{
  _deviceMessageId = newDeviceMessageId;
}

- (void) dealloc
{
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserMessageSyncAck */

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

@end /*interface MYSMSAPINS0UserMessageSyncAck (JAXB)*/

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

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

  [_mYSMSAPINS0UserMessageSyncAck autorelease];
  return _mYSMSAPINS0UserMessageSyncAck;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSyncAck 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 MYSMSAPINS0UserMessageSyncAck 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceMessageId", 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 setDeviceMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceMessageId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0UserMessageSyncAck_M */
#ifndef DEF_MYSMSAPINS0UserMessageSync_M
#define DEF_MYSMSAPINS0UserMessageSync_M

/**
 *  Message Synchronization Object
 
 Used to synchronize a message from server to device and vice versa.
 
 @author gpansy


 */
@implementation MYSMSAPINS0UserMessageSync

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The message id of the message
 * 
 * The message id will be zero for new messages from the device otherwise the message id must be greater than zero.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The message id of the message
 * 
 * The message id will be zero for new messages from the device otherwise the message id must be greater than zero.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * The device message id of the message
 * 
 * The device message id will be zero for new messages from the server otherwise the device message id must be greater than zero.
 */
- (int) deviceMessageId
{
  return _deviceMessageId;
}

/**
 * The device message id of the message
 * 
 * The device message id will be zero for new messages from the server otherwise the device message id must be greater than zero.
 */
- (void) setDeviceMessageId: (int) newDeviceMessageId
{
  _deviceMessageId = newDeviceMessageId;
}

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The message body
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message body
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The message direction (incoming or outgoing) state
 */
- (BOOL *) incoming
{
  return _incoming;
}

/**
 * The message direction (incoming or outgoing) state
 */
- (void) setIncoming: (BOOL *) newIncoming
{
  if (_incoming != NULL) {
    free(_incoming);
  }
  _incoming = newIncoming;
}

/**
 * The message read state
 */
- (BOOL *) read
{
  return _read;
}

/**
 * The message read state
 */
- (void) setRead: (BOOL *) newRead
{
  if (_read != NULL) {
    free(_read);
  }
  _read = newRead;
}

/**
 * The message locked state
 * 
 * If a message is locked, it will be not cleaned automatically.
 */
- (BOOL *) locked
{
  return _locked;
}

/**
 * The message locked state
 * 
 * If a message is locked, it will be not cleaned automatically.
 */
- (void) setLocked: (BOOL *) newLocked
{
  if (_locked != NULL) {
    free(_locked);
  }
  _locked = newLocked;
}

/**
 * The origin of the message
 * 
 * 0 .. sim
 * 1 .. mysms
 * 2 .. a2a
 */
- (int *) origin
{
  return _origin;
}

/**
 * The origin of the message
 * 
 * 0 .. sim
 * 1 .. mysms
 * 2 .. a2a
 */
- (void) setOrigin: (int *) newOrigin
{
  if (_origin != NULL) {
    free(_origin);
  }
  _origin = newOrigin;
}

/**
 * The status of the message
 * 
 * 0 .. none
 * 1 .. pending
 * 2 .. complete
 * 3 .. failed
 */
- (int *) status
{
  return _status;
}

/**
 * The status of the message
 * 
 * 0 .. none
 * 1 .. pending
 * 2 .. complete
 * 3 .. failed
 */
- (void) setStatus: (int *) newStatus
{
  if (_status != NULL) {
    free(_status);
  }
  _status = newStatus;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

/**
 * Optional date for the specific status.
 * <br/><br/>
 * completed .. the date when the message was received by the recipient<br/>
 * sending .. the date when the message will be sent<br/>
 */
- (NSDate *) dateStatus
{
  return _dateStatus;
}

/**
 * Optional date for the specific status.
 * <br/><br/>
 * completed .. the date when the message was received by the recipient<br/>
 * sending .. the date when the message will be sent<br/>
 */
- (void) setDateStatus: (NSDate *) newDateStatus
{
  [newDateStatus retain];
  [_dateStatus release];
  _dateStatus = newDateStatus;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setMessage: nil];
  [self setIncoming: NULL];
  [self setRead: NULL];
  [self setLocked: NULL];
  [self setOrigin: NULL];
  [self setStatus: NULL];
  [self setDateSent: nil];
  [self setDateStatus: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserMessageSync */

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

@end /*interface MYSMSAPINS0UserMessageSync (JAXB)*/

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

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

  [_mYSMSAPINS0UserMessageSync autorelease];
  return _mYSMSAPINS0UserMessageSync;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSync 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 MYSMSAPINS0UserMessageSync 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceMessageId", 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 setDeviceMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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


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

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

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

    [self setDateStatus: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceMessageId."];
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserMessageSync_M */
#ifndef DEF_MYSMSAPINS0UserContactSyncAck_M
#define DEF_MYSMSAPINS0UserContactSyncAck_M

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

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The (server) contact id for the contact.
 */
- (int) contactId
{
  return _contactId;
}

/**
 * The (server) contact id for the contact.
 */
- (void) setContactId: (int) newContactId
{
  _contactId = newContactId;
}

/**
 * The device contact id for the contact.
 */
- (int) deviceContactId
{
  return _deviceContactId;
}

/**
 * The device contact id for the contact.
 */
- (void) setDeviceContactId: (int) newDeviceContactId
{
  _deviceContactId = newDeviceContactId;
}

- (void) dealloc
{
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserContactSyncAck */

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

@end /*interface MYSMSAPINS0UserContactSyncAck (JAXB)*/

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

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

  [_mYSMSAPINS0UserContactSyncAck autorelease];
  return _mYSMSAPINS0UserContactSyncAck;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactSyncAck 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 MYSMSAPINS0UserContactSyncAck 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceContactId", 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 setDeviceContactId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contactId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}contactId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}contactId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceContactId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceContactId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0UserContactSyncAck_M */
#ifndef DEF_MYSMSAPINS0UserContactSync_M
#define DEF_MYSMSAPINS0UserContactSync_M

/**
 *  Message Synchronization Object
 
 Used to synchronize a message from server to device and vice versa.
 
 @author gpansy


 */
@implementation MYSMSAPINS0UserContactSync

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this message
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The contact id of the contact
 * 
 * The contact id will be zero for new contacts from the device otherwise the contact id must be greater than zero.
 */
- (int) contactId
{
  return _contactId;
}

/**
 * The contact id of the contact
 * 
 * The contact id will be zero for new contacts from the device otherwise the contact id must be greater than zero.
 */
- (void) setContactId: (int) newContactId
{
  _contactId = newContactId;
}

/**
 * The device contact id of the message
 * 
 * The device contact id will be zero for new contacts from the server otherwise the device contact id must be greater than zero.
 */
- (int) deviceContactId
{
  return _deviceContactId;
}

/**
 * The device contact id of the message
 * 
 * The device contact id will be zero for new contacts from the server otherwise the device contact id must be greater than zero.
 */
- (void) setDeviceContactId: (int) newDeviceContactId
{
  _deviceContactId = newDeviceContactId;
}

/**
 * The name of the contact. (64 chars allowed, more will be truncated)
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the contact. (64 chars allowed, more will be truncated)
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The msisdn's in international format (+4367612345678) - for short codes (6567).
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdn's in international format (+4367612345678) - for short codes (6567).
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

/**
 * The type (mobile, work, home, ...)  for the msisdn at the same array position.
 * 
 * The array size must be the same than msisdns or null.
 */
- (NSArray *) msisdnsType
{
  return _msisdnsType;
}

/**
 * The type (mobile, work, home, ...)  for the msisdn at the same array position.
 * 
 * The array size must be the same than msisdns or null.
 */
- (void) setMsisdnsType: (NSArray *) newMsisdnsType
{
  [newMsisdnsType retain];
  [_msisdnsType release];
  _msisdnsType = newMsisdnsType;
}

/**
 * The contact group names for this contact
 */
- (NSArray *) contactGroups
{
  return _contactGroups;
}

/**
 * The contact group names for this contact
 */
- (void) setContactGroups: (NSArray *) newContactGroups
{
  [newContactGroups retain];
  [_contactGroups release];
  _contactGroups = newContactGroups;
}

/**
 * The mime type of the avatar
 * 
 * 0 .. jpeg
 * 1 .. png
 */
- (int *) avatarMimeType
{
  return _avatarMimeType;
}

/**
 * The mime type of the avatar
 * 
 * 0 .. jpeg
 * 1 .. png
 */
- (void) setAvatarMimeType: (int *) newAvatarMimeType
{
  if (_avatarMimeType != NULL) {
    free(_avatarMimeType);
  }
  _avatarMimeType = newAvatarMimeType;
}

/**
 * The avatar data of the contact base64 encoded.
 * 
 * The maximum size of an avatar is 10 KB.
 */
- (NSString *) avatarData
{
  return _avatarData;
}

/**
 * The avatar data of the contact base64 encoded.
 * 
 * The maximum size of an avatar is 10 KB.
 */
- (void) setAvatarData: (NSString *) newAvatarData
{
  [newAvatarData retain];
  [_avatarData release];
  _avatarData = newAvatarData;
}

- (void) dealloc
{
  [self setName: nil];
  [self setMsisdns: nil];
  [self setMsisdnsType: nil];
  [self setContactGroups: nil];
  [self setAvatarMimeType: NULL];
  [self setAvatarData: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserContactSync */

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

@end /*interface MYSMSAPINS0UserContactSync (JAXB)*/

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

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

  [_mYSMSAPINS0UserContactSync autorelease];
  return _mYSMSAPINS0UserContactSync;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactSync 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 MYSMSAPINS0UserContactSync 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceContactId", 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 setDeviceContactId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "avatarMimeType", 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 setAvatarMimeType: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "avatarData", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setAvatarData: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contactId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}contactId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}contactId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceContactId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceContactId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceContactId."];
    }
  }
  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 msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

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

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

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

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

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

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserContactSync_M */
#ifndef DEF_MYSMSAPINS0UserContact_M
#define DEF_MYSMSAPINS0UserContact_M

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

/**
 * The contact id of the contact.
 */
- (int) contactId
{
  return _contactId;
}

/**
 * The contact id of the contact.
 */
- (void) setContactId: (int) newContactId
{
  _contactId = newContactId;
}

/**
 * The name of the message.
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the message.
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The msisdn of the contact.
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdn of the contact.
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

/**
 * The type (mobile, work, home, ...)  for the msisdn at the same array position.
 * 
 * The array size must be the same than msisdns or null.
 */
- (NSArray *) msisdnsType
{
  return _msisdnsType;
}

/**
 * The type (mobile, work, home, ...)  for the msisdn at the same array position.
 * 
 * The array size must be the same than msisdns or null.
 */
- (void) setMsisdnsType: (NSArray *) newMsisdnsType
{
  [newMsisdnsType retain];
  [_msisdnsType release];
  _msisdnsType = newMsisdnsType;
}

/**
 * The contact group names.
 */
- (NSArray *) contactGroups
{
  return _contactGroups;
}

/**
 * The contact group names.
 */
- (void) setContactGroups: (NSArray *) newContactGroups
{
  [newContactGroups retain];
  [_contactGroups release];
  _contactGroups = newContactGroups;
}

/**
 * The relative url of the avatar or null if the contact has none.
 * 
 * Use http(s)://api.mysms.com as host.
 */
- (NSString *) avatarUrl
{
  return _avatarUrl;
}

/**
 * The relative url of the avatar or null if the contact has none.
 * 
 * Use http(s)://api.mysms.com as host.
 */
- (void) setAvatarUrl: (NSString *) newAvatarUrl
{
  [newAvatarUrl retain];
  [_avatarUrl release];
  _avatarUrl = newAvatarUrl;
}

- (void) dealloc
{
  [self setName: nil];
  [self setMsisdns: nil];
  [self setMsisdnsType: nil];
  [self setContactGroups: nil];
  [self setAvatarUrl: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserContact */

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

@end /*interface MYSMSAPINS0UserContact (JAXB)*/

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

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

  [_mYSMSAPINS0UserContact autorelease];
  return _mYSMSAPINS0UserContact;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContact 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 MYSMSAPINS0UserContact 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];
}

//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 "contactId", 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 setContactId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    [self setAvatarUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contactId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}contactId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}contactId."];
    }
  }
  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 msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

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

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

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

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserContact_M */
#ifndef DEF_MYSMSAPINS0UserCallSyncAck_M
#define DEF_MYSMSAPINS0UserCallSyncAck_M

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

/**
 * The sync operation for this call
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this call
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The (server) call id for the call.
 */
- (int) callId
{
  return _callId;
}

/**
 * The (server) call id for the call.
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

/**
 * The device call id for the call.
 */
- (int) deviceCallId
{
  return _deviceCallId;
}

/**
 * The device call id for the call.
 */
- (void) setDeviceCallId: (int) newDeviceCallId
{
  _deviceCallId = newDeviceCallId;
}

- (void) dealloc
{
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserCallSyncAck */

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

@end /*interface MYSMSAPINS0UserCallSyncAck (JAXB)*/

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

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

  [_mYSMSAPINS0UserCallSyncAck autorelease];
  return _mYSMSAPINS0UserCallSyncAck;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallSyncAck 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 MYSMSAPINS0UserCallSyncAck 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceCallId", 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 setDeviceCallId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}callId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceCallId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceCallId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0UserCallSyncAck_M */
#ifndef DEF_MYSMSAPINS0UserCallSync_M
#define DEF_MYSMSAPINS0UserCallSync_M

/**
 *  Call Synchronization Object
 
 Used to synchronize a call from server to device and vice versa.
 
 @author gpansy


 */
@implementation MYSMSAPINS0UserCallSync

/**
 * The sync operation for this call
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (int) operation
{
  return _operation;
}

/**
 * The sync operation for this call
 * 
 * 0 .. update
 * 1 .. insert
 * 2 .. delete
 */
- (void) setOperation: (int) newOperation
{
  _operation = newOperation;
}

/**
 * The call id of the call
 * 
 * The call id will be zero for new calls from the device otherwise the call id must be greater than zero.
 */
- (int) callId
{
  return _callId;
}

/**
 * The call id of the call
 * 
 * The call id will be zero for new calls from the device otherwise the call id must be greater than zero.
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

/**
 * The device call id of the call
 * 
 * The device call id will be zero for new calls from the server otherwise the device call id must be greater than zero.
 */
- (int) deviceCallId
{
  return _deviceCallId;
}

/**
 * The device call id of the call
 * 
 * The device call id will be zero for new calls from the server otherwise the device call id must be greater than zero.
 */
- (void) setDeviceCallId: (int) newDeviceCallId
{
  _deviceCallId = newDeviceCallId;
}

/**
 * The address of the call in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 * (20 chars allowed, more will be truncated)
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the call in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 * (20 chars allowed, more will be truncated)
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The call direction (incoming or outgoing) state
 */
- (BOOL *) incoming
{
  return _incoming;
}

/**
 * The call direction (incoming or outgoing) state
 */
- (void) setIncoming: (BOOL *) newIncoming
{
  if (_incoming != NULL) {
    free(_incoming);
  }
  _incoming = newIncoming;
}

/**
 * The call read state
 */
- (BOOL *) read
{
  return _read;
}

/**
 * The call read state
 */
- (void) setRead: (BOOL *) newRead
{
  if (_read != NULL) {
    free(_read);
  }
  _read = newRead;
}

/**
 * The duration of the call in seconds
 */
- (int *) duration
{
  return _duration;
}

/**
 * The duration of the call in seconds
 */
- (void) setDuration: (int *) newDuration
{
  if (_duration != NULL) {
    free(_duration);
  }
  _duration = newDuration;
}

/**
 * The status of the call
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (int *) status
{
  return _status;
}

/**
 * The status of the call
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (void) setStatus: (int *) newStatus
{
  if (_status != NULL) {
    free(_status);
  }
  _status = newStatus;
}

/**
 * The date when the call was initiated
 */
- (NSDate *) dateCall
{
  return _dateCall;
}

/**
 * The date when the call was initiated
 */
- (void) setDateCall: (NSDate *) newDateCall
{
  [newDateCall retain];
  [_dateCall release];
  _dateCall = newDateCall;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setIncoming: NULL];
  [self setRead: NULL];
  [self setDuration: NULL];
  [self setStatus: NULL];
  [self setDateCall: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserCallSync */

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

@end /*interface MYSMSAPINS0UserCallSync (JAXB)*/

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

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

  [_mYSMSAPINS0UserCallSync autorelease];
  return _mYSMSAPINS0UserCallSync;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallSync 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 MYSMSAPINS0UserCallSync 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];
}

//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 "operation", 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 setOperation: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceCallId", 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 setDeviceCallId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


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

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateCall", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setDateCall: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "operation", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}operation."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}operation."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}callId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceCallId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceCallId."];
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0UserCallSync_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsSendAck_M
#define DEF_MYSMSAPINS0RemoteSmsSendAck_M

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

/**
 * The msisdn of the recipient
 */
- (NSString *) recipient
{
  return _recipient;
}

/**
 * The msisdn of the recipient
 */
- (void) setRecipient: (NSString *) newRecipient
{
  [newRecipient retain];
  [_recipient release];
  _recipient = newRecipient;
}

/**
 * The (server) message id for the message if one was created.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id for the message if one was created.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [self setRecipient: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0RemoteSmsSendAck */

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

@end /*interface MYSMSAPINS0RemoteSmsSendAck (JAXB)*/

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

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

  [_mYSMSAPINS0RemoteSmsSendAck autorelease];
  return _mYSMSAPINS0RemoteSmsSendAck;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsSendAck 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 MYSMSAPINS0RemoteSmsSendAck 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];
}

//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 "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0RemoteSmsSendAck_M */
#ifndef DEF_MYSMSAPINS0ConfigProduct_M
#define DEF_MYSMSAPINS0ConfigProduct_M

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

/**
 * The product id
 */
- (int) identifier
{
  return _identifier;
}

/**
 * The product id
 */
- (void) setIdentifier: (int) newIdentifier
{
  _identifier = newIdentifier;
}

/**
 * The country id for this product
 */
- (int) countryId
{
  return _countryId;
}

/**
 * The country id for this product
 */
- (void) setCountryId: (int) newCountryId
{
  _countryId = newCountryId;
}

/**
 * The product type
 * 
 * sms0 .. domestic sms
 * sms1 .. foreign sms
 * credit .. sms credit
 * subscription .. sms subscription
 */
- (NSString *) type
{
  return _type;
}

/**
 * The product type
 * 
 * sms0 .. domestic sms
 * sms1 .. foreign sms
 * credit .. sms credit
 * subscription .. sms subscription
 */
- (void) setType: (NSString *) newType
{
  [newType retain];
  [_type release];
  _type = newType;
}

/**
 * The name of the product
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the product
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The length of a period in months if it is a subscription product
 */
- (int) subscriptionLength
{
  return _subscriptionLength;
}

/**
 * The length of a period in months if it is a subscription product
 */
- (void) setSubscriptionLength: (int) newSubscriptionLength
{
  _subscriptionLength = newSubscriptionLength;
}

/**
 * The price of the product
 */
- (double) price
{
  return _price;
}

/**
 * The price of the product
 */
- (void) setPrice: (double) newPrice
{
  _price = newPrice;
}

/**
 * Is the product available for purchase
 */
- (BOOL) available
{
  return _available;
}

/**
 * Is the product available for purchase
 */
- (void) setAvailable: (BOOL) newAvailable
{
  _available = newAvailable;
}

/**
 * The code of the product if set
 */
- (NSString *) code
{
  return _code;
}

/**
 * The code of the product if set
 */
- (void) setCode: (NSString *) newCode
{
  [newCode retain];
  [_code release];
  _code = newCode;
}

- (void) dealloc
{
  [self setType: nil];
  [self setName: nil];
  [self setCode: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0ConfigProduct */

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

@end /*interface MYSMSAPINS0ConfigProduct (JAXB)*/

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

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

  [_mYSMSAPINS0ConfigProduct autorelease];
  return _mYSMSAPINS0ConfigProduct;
}

/**
 * Initialize this instance of MYSMSAPINS0ConfigProduct 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 MYSMSAPINS0ConfigProduct 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];
}

//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 "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 setIdentifier: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "countryId", 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 setCountryId: *((int*) _child_accessor)];
    free(_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 setType: __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 "subscriptionLength", 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 setSubscriptionLength: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

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

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

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "available", 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 setAvailable: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "code", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setCode: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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
    status = xmlTextWriterWriteIntType(writer, &_identifier);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}id...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}id."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}id."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}countryId."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}countryId."];
    }
  }
  if ([self type]) {
    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 type] 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 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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionLength", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}subscriptionLength."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subscriptionLength."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "price", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}price."];
    }

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}price."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "available", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}available."];
    }

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

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

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

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

#endif /* DEF_MYSMSAPINS0ConfigProduct_M */
#ifndef DEF_MYSMSAPINS0Request_M
#define DEF_MYSMSAPINS0Request_M

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

/**
 * 
 */
- (NSString *) apiKey
{
  return _apiKey;
}

/**
 * 
 */
- (void) setApiKey: (NSString *) newApiKey
{
  [newApiKey retain];
  [_apiKey release];
  _apiKey = newApiKey;
}

- (void) dealloc
{
  [self setApiKey: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0Request */

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

@end /*interface MYSMSAPINS0Request (JAXB)*/

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

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

  [_mYSMSAPINS0Request autorelease];
  return _mYSMSAPINS0Request;
}

/**
 * Initialize this instance of MYSMSAPINS0Request 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 MYSMSAPINS0Request 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];
}

//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 "apiKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

    [self setApiKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

#endif /* DEF_MYSMSAPINS0Request_M */
#ifndef DEF_MYSMSAPINS0AttachmentAllowMsisdnsResponse_M
#define DEF_MYSMSAPINS0AttachmentAllowMsisdnsResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0AttachmentAllowMsisdnsResponse (JAXB)*/

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

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

  [_mYSMSAPINS0AttachmentAllowMsisdnsResponse autorelease];
  return _mYSMSAPINS0AttachmentAllowMsisdnsResponse;
}

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

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

  return _attachmentAllowMsisdnsResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0AttachmentAllowMsisdnsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentAllowMsisdnsResponse_M */
#ifndef DEF_MYSMSAPINS0AttachmentCreateResponse_M
#define DEF_MYSMSAPINS0AttachmentCreateResponse_M

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

/**
 * The newly created attachment key
 */
- (NSString *) attachmentKey
{
  return _attachmentKey;
}

/**
 * The newly created attachment key
 */
- (void) setAttachmentKey: (NSString *) newAttachmentKey
{
  [newAttachmentKey retain];
  [_attachmentKey release];
  _attachmentKey = newAttachmentKey;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0AttachmentCreateResponse (JAXB)*/

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

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

  [_mYSMSAPINS0AttachmentCreateResponse autorelease];
  return _mYSMSAPINS0AttachmentCreateResponse;
}

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

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

  return _attachmentCreateResponse;
}

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

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

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

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

    [self setAttachmentKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

#endif /* DEF_MYSMSAPINS0AttachmentCreateResponse_M */
#ifndef DEF_MYSMSAPINS0ConfigGetCountriesRequest_M
#define DEF_MYSMSAPINS0ConfigGetCountriesRequest_M

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

/**
 * 
 */
- (NSString *) code
{
  return _code;
}

/**
 * 
 */
- (void) setCode: (NSString *) newCode
{
  [newCode retain];
  [_code release];
  _code = newCode;
}

/**
 * null
 */
- (NSString *) authToken
{
  return _authToken;
}

/**
 * null
 */
- (void) setAuthToken: (NSString *) newAuthToken
{
  [newAuthToken retain];
  [_authToken release];
  _authToken = newAuthToken;
}

- (void) dealloc
{
  [self setCode: nil];
  [self setAuthToken: nil];
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ConfigGetCountriesRequest (JAXB)*/

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

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

  [_mYSMSAPINS0ConfigGetCountriesRequest autorelease];
  return _mYSMSAPINS0ConfigGetCountriesRequest;
}

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

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

  return _configGetCountriesRequest;
}

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

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

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

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

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

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

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

    [self setAuthToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0ConfigGetCountriesRequest_M */
#ifndef DEF_MYSMSAPINS0ConfigGetCountriesResponse_M
#define DEF_MYSMSAPINS0ConfigGetCountriesResponse_M

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

/**
 * (no documentation provided)
 */
- (NSArray *) countries
{
  return _countries;
}

/**
 * (no documentation provided)
 */
- (void) setCountries: (NSArray *) newCountries
{
  [newCountries retain];
  [_countries release];
  _countries = newCountries;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0ConfigGetCountriesResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ConfigGetCountriesResponse autorelease];
  return _mYSMSAPINS0ConfigGetCountriesResponse;
}

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

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

  return _configGetCountriesResponse;
}

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

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

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

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

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

    if ([self countries]) {
      [self setCountries: [[self countries] arrayByAddingObject: __child]];
    }
    else {
      [self setCountries: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

#endif /* DEF_MYSMSAPINS0ConfigGetCountriesResponse_M */
#ifndef DEF_MYSMSAPINS0CrmMessageClickedResponse_M
#define DEF_MYSMSAPINS0CrmMessageClickedResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0CrmMessageClickedResponse (JAXB)*/

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

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

  [_mYSMSAPINS0CrmMessageClickedResponse autorelease];
  return _mYSMSAPINS0CrmMessageClickedResponse;
}

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

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

  return _crmMessageClickedResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0CrmMessageClickedResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0CrmMessageClickedResponse_M */
#ifndef DEF_MYSMSAPINS0CrmMessageViewedResponse_M
#define DEF_MYSMSAPINS0CrmMessageViewedResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0CrmMessageViewedResponse (JAXB)*/

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

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

  [_mYSMSAPINS0CrmMessageViewedResponse autorelease];
  return _mYSMSAPINS0CrmMessageViewedResponse;
}

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

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

  return _crmMessageViewedResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0CrmMessageViewedResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0CrmMessageViewedResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountConnectResponse_M
#define DEF_MYSMSAPINS0ExternalAccountConnectResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountConnectResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountConnectResponse autorelease];
  return _mYSMSAPINS0ExternalAccountConnectResponse;
}

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

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

  return _externalAccountConnectResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0ExternalAccountConnectResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountConnectResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountCreateRequest_M
#define DEF_MYSMSAPINS0ExternalAccountCreateRequest_M

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

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth token of the external account
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The oauth token of the external account
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

/**
 * The optional refresh token of the external account
 */
- (NSString *) refreshToken
{
  return _refreshToken;
}

/**
 * The optional refresh token of the external account
 */
- (void) setRefreshToken: (NSString *) newRefreshToken
{
  [newRefreshToken retain];
  [_refreshToken release];
  _refreshToken = newRefreshToken;
}

/**
 * The iso country code {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2}
 */
- (NSString *) countryCode
{
  return _countryCode;
}

/**
 * The iso country code {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2}
 */
- (void) setCountryCode: (NSString *) newCountryCode
{
  [newCountryCode retain];
  [_countryCode release];
  _countryCode = newCountryCode;
}

- (void) dealloc
{
  [self setOauthToken: nil];
  [self setRefreshToken: nil];
  [self setCountryCode: nil];
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountCreateRequest (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountCreateRequest autorelease];
  return _mYSMSAPINS0ExternalAccountCreateRequest;
}

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

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

  return _externalAccountCreateRequest;
}

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

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

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountCreateRequest for root element {}externalAccountCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountCreateRequest for root element {}externalAccountCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountCreateRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

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

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

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

    [self setCountryCode: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthToken."];
    }

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0ExternalAccountCreateRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountDeleteResponse_M
#define DEF_MYSMSAPINS0ExternalAccountDeleteResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountDeleteResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountDeleteResponse autorelease];
  return _mYSMSAPINS0ExternalAccountDeleteResponse;
}

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

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

  return _externalAccountDeleteResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0ExternalAccountDeleteResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountDeleteResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountDisconnectResponse_M
#define DEF_MYSMSAPINS0ExternalAccountDisconnectResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountDisconnectResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountDisconnectResponse autorelease];
  return _mYSMSAPINS0ExternalAccountDisconnectResponse;
}

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

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

  return _externalAccountDisconnectResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0ExternalAccountDisconnectResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountDisconnectResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountGetTokenResponse_M
#define DEF_MYSMSAPINS0ExternalAccountGetTokenResponse_M

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

/**
 * The newly refreshed access token.
 */
- (NSString *) accessToken
{
  return _accessToken;
}

/**
 * The newly refreshed access token.
 */
- (void) setAccessToken: (NSString *) newAccessToken
{
  [newAccessToken retain];
  [_accessToken release];
  _accessToken = newAccessToken;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountGetTokenResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountGetTokenResponse autorelease];
  return _mYSMSAPINS0ExternalAccountGetTokenResponse;
}

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

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

  return _externalAccountGetTokenResponse;
}

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

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

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

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

    [self setAccessToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

#endif /* DEF_MYSMSAPINS0ExternalAccountGetTokenResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountInitiateResponse_M
#define DEF_MYSMSAPINS0ExternalAccountInitiateResponse_M

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

/**
 * The oauth authorize url where the user needs to enter his credentials
 */
- (NSString *) oauthAuthorizeUrl
{
  return _oauthAuthorizeUrl;
}

/**
 * The oauth authorize url where the user needs to enter his credentials
 */
- (void) setOauthAuthorizeUrl: (NSString *) newOauthAuthorizeUrl
{
  [newOauthAuthorizeUrl retain];
  [_oauthAuthorizeUrl release];
  _oauthAuthorizeUrl = newOauthAuthorizeUrl;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountInitiateResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountInitiateResponse autorelease];
  return _mYSMSAPINS0ExternalAccountInitiateResponse;
}

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

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

  return _externalAccountInitiateResponse;
}

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

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

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

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

    [self setOauthAuthorizeUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

#endif /* DEF_MYSMSAPINS0ExternalAccountInitiateResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountLoginResponse_M
#define DEF_MYSMSAPINS0ExternalAccountLoginResponse_M

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

/**
 * The user's verified mobile number
 */
- (long long *) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long *) newMsisdn
{
  if (_msisdn != NULL) {
    free(_msisdn);
  }
  _msisdn = newMsisdn;
}

/**
 * The authentication token
 */
- (NSString *) authToken
{
  return _authToken;
}

/**
 * The authentication token
 */
- (void) setAuthToken: (NSString *) newAuthToken
{
  [newAuthToken retain];
  [_authToken release];
  _authToken = newAuthToken;
}

/**
 * The info which can be configured per api key.
 */
- (NSString *) info
{
  return _info;
}

/**
 * The info which can be configured per api key.
 */
- (void) setInfo: (NSString *) newInfo
{
  [newInfo retain];
  [_info release];
  _info = newInfo;
}

/**
 * The date when the user was last verified
 */
- (NSDate *) dateVerified
{
  return _dateVerified;
}

/**
 * The date when the user was last verified
 */
- (void) setDateVerified: (NSDate *) newDateVerified
{
  [newDateVerified retain];
  [_dateVerified release];
  _dateVerified = newDateVerified;
}

/**
 * The iso country code {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2}
 */
- (NSString *) countryCode
{
  return _countryCode;
}

/**
 * The iso country code {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2}
 */
- (void) setCountryCode: (NSString *) newCountryCode
{
  [newCountryCode retain];
  [_countryCode release];
  _countryCode = newCountryCode;
}

/**
 * The international dial prefix {http://en.wikipedia.org/wiki/List_of_country_calling_codes} for the home country of this account
 */
- (int) dialPrefix
{
  return _dialPrefix;
}

/**
 * The international dial prefix {http://en.wikipedia.org/wiki/List_of_country_calling_codes} for the home country of this account
 */
- (void) setDialPrefix: (int) newDialPrefix
{
  _dialPrefix = newDialPrefix;
}

/**
 * The iso currency code {http://en.wikipedia.org/wiki/ISO_currency_code}
 */
- (NSString *) currencyCode
{
  return _currencyCode;
}

/**
 * The iso currency code {http://en.wikipedia.org/wiki/ISO_currency_code}
 */
- (void) setCurrencyCode: (NSString *) newCurrencyCode
{
  [newCurrencyCode retain];
  [_currencyCode release];
  _currencyCode = newCurrencyCode;
}

/**
 * The email of the external account if available.
 */
- (NSString *) email
{
  return _email;
}

/**
 * The email of the external account if available.
 */
- (void) setEmail: (NSString *) newEmail
{
  [newEmail retain];
  [_email release];
  _email = newEmail;
}

- (void) dealloc
{
  [self setMsisdn: NULL];
  [self setAuthToken: nil];
  [self setInfo: nil];
  [self setDateVerified: nil];
  [self setCountryCode: nil];
  [self setCurrencyCode: nil];
  [self setEmail: nil];
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountLoginResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountLoginResponse autorelease];
  return _mYSMSAPINS0ExternalAccountLoginResponse;
}

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

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

  return _externalAccountLoginResponse;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dialPrefix", 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 setDialPrefix: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

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

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

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

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

    [self setEmail: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

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

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

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

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

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

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}countryCode."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dialPrefix", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dialPrefix."];
    }

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

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

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

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

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

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

#endif /* DEF_MYSMSAPINS0ExternalAccountLoginResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountValidateResponse_M
#define DEF_MYSMSAPINS0ExternalAccountValidateResponse_M

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

/**
 * The validated oauth token, which can be used to login, connect or disconnect
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The validated oauth token, which can be used to login, connect or disconnect
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0ExternalAccountValidateResponse (JAXB)*/

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

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

  [_mYSMSAPINS0ExternalAccountValidateResponse autorelease];
  return _mYSMSAPINS0ExternalAccountValidateResponse;
}

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

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

  return _externalAccountValidateResponse;
}

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

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

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

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

    [self setOauthToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

#endif /* DEF_MYSMSAPINS0ExternalAccountValidateResponse_M */
#ifndef DEF_MYSMSAPINS0FeedbackSendResponse_M
#define DEF_MYSMSAPINS0FeedbackSendResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0FeedbackSendResponse (JAXB)*/

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

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

  [_mYSMSAPINS0FeedbackSendResponse autorelease];
  return _mYSMSAPINS0FeedbackSendResponse;
}

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

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

  return _feedbackSendResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0FeedbackSendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0FeedbackSendResponse_M */
#ifndef DEF_MYSMSAPINS0GroupCreateResponse_M
#define DEF_MYSMSAPINS0GroupCreateResponse_M

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

/**
 * The group id of newly created group.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of newly created group.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0GroupCreateResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupCreateResponse autorelease];
  return _mYSMSAPINS0GroupCreateResponse;
}

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

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

  return _groupCreateResponse;
}

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

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

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupCreateResponse for root element {}groupCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupCreateResponse for root element {}groupCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupCreateResponse. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

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

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

#endif /* DEF_MYSMSAPINS0GroupCreateResponse_M */
#ifndef DEF_MYSMSAPINS0GroupGetGroupsResponse_M
#define DEF_MYSMSAPINS0GroupGetGroupsResponse_M

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

/**
 * The groups of the authenticated user.
 */
- (NSArray *) groups
{
  return _groups;
}

/**
 * The groups of the authenticated user.
 */
- (void) setGroups: (NSArray *) newGroups
{
  [newGroups retain];
  [_groups release];
  _groups = newGroups;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0GroupGetGroupsResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupGetGroupsResponse autorelease];
  return _mYSMSAPINS0GroupGetGroupsResponse;
}

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

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

  return _groupGetGroupsResponse;
}

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

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

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

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

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

    if ([self groups]) {
      [self setGroups: [[self groups] arrayByAddingObject: __child]];
    }
    else {
      [self setGroups: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

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

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

#endif /* DEF_MYSMSAPINS0GroupGetGroupsResponse_M */
#ifndef DEF_MYSMSAPINS0GroupGetUsersResponse_M
#define DEF_MYSMSAPINS0GroupGetUsersResponse_M

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

/**
 * The msisdns of the group user's in international format (436761234567).
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdns of the group user's in international format (436761234567).
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

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

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

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

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

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

@end /*interface MYSMSAPINS0GroupGetUsersResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupGetUsersResponse autorelease];
  return _mYSMSAPINS0GroupGetUsersResponse;
}

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

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

  return _groupGetUsersResponse;
}

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

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

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

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

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(long long)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    if ([self msisdns]) {
      [self setMsisdns: [[self msisdns] arrayByAddingObject: __child]];
    }
    else {
      [self setMsisdns: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

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

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

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}msisdns...");
#endif
      status = xmlTextWriterWriteLongType(writer, ((long long*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}msisdns."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}msisdns...");
#endif

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

#endif /* DEF_MYSMSAPINS0GroupGetUsersResponse_M */
#ifndef DEF_MYSMSAPINS0GroupInviteUsersResponse_M
#define DEF_MYSMSAPINS0GroupInviteUsersResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0GroupInviteUsersResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupInviteUsersResponse autorelease];
  return _mYSMSAPINS0GroupInviteUsersResponse;
}

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

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

  return _groupInviteUsersResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0GroupInviteUsersResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupInviteUsersResponse_M */
#ifndef DEF_MYSMSAPINS0GroupLeaveResponse_M
#define DEF_MYSMSAPINS0GroupLeaveResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0GroupLeaveResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupLeaveResponse autorelease];
  return _mYSMSAPINS0GroupLeaveResponse;
}

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

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

  return _groupLeaveResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0GroupLeaveResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupLeaveResponse_M */
#ifndef DEF_MYSMSAPINS0GroupRenameResponse_M
#define DEF_MYSMSAPINS0GroupRenameResponse_M

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

- (void) dealloc
{
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0GroupRenameResponse (JAXB)*/

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

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

  [_mYSMSAPINS0GroupRenameResponse autorelease];
  return _mYSMSAPINS0GroupRenameResponse;
}

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

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

  return _groupRenameResponse;
}

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

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

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

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0GroupRenameResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupRenameResponse_M */
#ifndef DEF_MYSMSAPINS0MessageSendRequest_M
#define DEF_MYSMSAPINS0MessageSendRequest_M

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

/**
 * (no documentation provided)
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * (no documentation provided)
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * (no documentation provided)
 */
- (NSString *) password
{
  return _password;
}

/**
 * (no documentation provided)
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

/**
 * The recipient in international format (+436761234567)
 */
- (NSString *) recipient
{
  return _recipient;
}

/**
 * The recipient in international format (+436761234567)
 */
- (void) setRecipient: (NSString *) newRecipient
{
  [newRecipient retain];
  [_recipient release];
  _recipient = newRecipient;
}

/**
 * The message to send
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (long long *) dateSendOn
{
  return _dateSendOn;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (void) setDateSendOn: (long long *) newDateSendOn
{
  if (_dateSendOn != NULL) {
    free(_dateSendOn);
  }
  _dateSendOn = newDateSendOn;
}

- (void) dealloc
{
  [self setPassword: nil];
  [self setRecipient: nil];
  [self setMessage: nil];
  [self setDateSendOn: NULL];
  [super dealloc];
}

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

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

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

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

@end /*interface MYSMSAPINS0MessageSendRequest (JAXB)*/

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

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

  [_mYSMSAPINS0MessageSendRequest autorelease];
  return _mYSMSAPINS0MessageSendRequest;
}

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

  if (xmlStrcmp(BAD_CAST "messageSendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}messageSendRequest.");
#endif
    _messageSendRequest = (MYSMSAPINS0MessageSendRequest *)[MYSMSAPINS0MessageSendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}messageSendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MessageSendRequest. Expected element messageSendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MessageSendRequest. Expected element messageSendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _messageSendRequest;
}

/**
 * Writes this MYSMSAPINS0MessageSendRequest to XML under element name "messageSendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _messageSendRequest The MessageSendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MessageSendRequest 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 "messageSendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}messageSendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}messageSendRequest for root element {}messageSendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}messageSendRequest for root element {}messageSendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}messageSendRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}recipient of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}recipient of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRecipient: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSendOn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setDateSendOn: ((long long*) _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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
  if ([self recipient]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipient."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}recipient...");
#endif
    [[self recipient] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}recipient...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if ([self dateSendOn] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSendOn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSendOn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSendOn...");
#endif
    status = xmlTextWriterWriteLongType(writer, [self dateSendOn]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSendOn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dateSendOn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSendOn."];
    }
  }
}
@end /* implementation MYSMSAPINS0MessageSendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MessageSendRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCallRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyCallRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCallRequest

/**
 * The msisdn to verify
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The msisdn to verify
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCallRequest *_mYSMSAPINS0MsisdnVerifyCallRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCallRequest = (MYSMSAPINS0MsisdnVerifyCallRequest *) [MYSMSAPINS0MsisdnVerifyCallRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCallRequest;
}

//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 MYSMSAPINS0MsisdnVerifyCallRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCallRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCallRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCallRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCallRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCallRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCallRequest *_mYSMSAPINS0MsisdnVerifyCallRequest = [[MYSMSAPINS0MsisdnVerifyCallRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCallRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCallRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCallRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyCallRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCallRequest 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 MYSMSAPINS0MsisdnVerifyCallRequest 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 MYSMSAPINS0MsisdnVerifyCallRequest from an XML reader. The element to be read is
 * "msisdnVerifyCallRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCallRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCallRequest *_msisdnVerifyCallRequest = 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 msisdnVerifyCallRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCallRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCallRequest.");
#endif
    _msisdnVerifyCallRequest = (MYSMSAPINS0MsisdnVerifyCallRequest *)[MYSMSAPINS0MsisdnVerifyCallRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCallRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCallRequest. Expected element msisdnVerifyCallRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCallRequest. Expected element msisdnVerifyCallRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCallRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCallRequest to XML under element name "msisdnVerifyCallRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCallRequest The MsisdnVerifyCallRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCallRequest 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 "msisdnVerifyCallRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCallRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCallRequest for root element {}msisdnVerifyCallRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCallRequest for root element {}msisdnVerifyCallRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCallRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCallRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCallRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCheckKeyRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyCheckKeyRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckKeyRequest

/**
 * The key to check
 */
- (NSString *) key
{
  return _key;
}

/**
 * The key to check
 */
- (void) setKey: (NSString *) newKey
{
  [newKey retain];
  [_key release];
  _key = newKey;
}

- (void) dealloc
{
  [self setKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCheckKeyRequest *_mYSMSAPINS0MsisdnVerifyCheckKeyRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCheckKeyRequest = (MYSMSAPINS0MsisdnVerifyCheckKeyRequest *) [MYSMSAPINS0MsisdnVerifyCheckKeyRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCheckKeyRequest;
}

//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 MYSMSAPINS0MsisdnVerifyCheckKeyRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCheckKeyRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCheckKeyRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckKeyRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCheckKeyRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCheckKeyRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCheckKeyRequest *_mYSMSAPINS0MsisdnVerifyCheckKeyRequest = [[MYSMSAPINS0MsisdnVerifyCheckKeyRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCheckKeyRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCheckKeyRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCheckKeyRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyCheckKeyRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCheckKeyRequest 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 MYSMSAPINS0MsisdnVerifyCheckKeyRequest 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 MYSMSAPINS0MsisdnVerifyCheckKeyRequest from an XML reader. The element to be read is
 * "msisdnVerifyCheckKeyRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCheckKeyRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCheckKeyRequest *_msisdnVerifyCheckKeyRequest = 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 msisdnVerifyCheckKeyRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCheckKeyRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCheckKeyRequest.");
#endif
    _msisdnVerifyCheckKeyRequest = (MYSMSAPINS0MsisdnVerifyCheckKeyRequest *)[MYSMSAPINS0MsisdnVerifyCheckKeyRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCheckKeyRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckKeyRequest. Expected element msisdnVerifyCheckKeyRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckKeyRequest. Expected element msisdnVerifyCheckKeyRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCheckKeyRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckKeyRequest to XML under element name "msisdnVerifyCheckKeyRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCheckKeyRequest The MsisdnVerifyCheckKeyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckKeyRequest 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 "msisdnVerifyCheckKeyRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCheckKeyRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCheckKeyRequest for root element {}msisdnVerifyCheckKeyRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCheckKeyRequest for root element {}msisdnVerifyCheckKeyRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCheckKeyRequest. 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 "key", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self key]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "key", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}key."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}key...");
#endif
    [[self key] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}key...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}key."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCheckKeyRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCheckKeyRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCheckPinRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyCheckPinRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckPinRequest

/**
 * The msisdn to verify
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The msisdn to verify
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The pin to check
 */
- (int) pin
{
  return _pin;
}

/**
 * The pin to check
 */
- (void) setPin: (int) newPin
{
  _pin = newPin;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCheckPinRequest *_mYSMSAPINS0MsisdnVerifyCheckPinRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCheckPinRequest = (MYSMSAPINS0MsisdnVerifyCheckPinRequest *) [MYSMSAPINS0MsisdnVerifyCheckPinRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCheckPinRequest;
}

//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 MYSMSAPINS0MsisdnVerifyCheckPinRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCheckPinRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCheckPinRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckPinRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCheckPinRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCheckPinRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCheckPinRequest *_mYSMSAPINS0MsisdnVerifyCheckPinRequest = [[MYSMSAPINS0MsisdnVerifyCheckPinRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCheckPinRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCheckPinRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCheckPinRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyCheckPinRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCheckPinRequest 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 MYSMSAPINS0MsisdnVerifyCheckPinRequest 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 MYSMSAPINS0MsisdnVerifyCheckPinRequest from an XML reader. The element to be read is
 * "msisdnVerifyCheckPinRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCheckPinRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCheckPinRequest *_msisdnVerifyCheckPinRequest = 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 msisdnVerifyCheckPinRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCheckPinRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCheckPinRequest.");
#endif
    _msisdnVerifyCheckPinRequest = (MYSMSAPINS0MsisdnVerifyCheckPinRequest *)[MYSMSAPINS0MsisdnVerifyCheckPinRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCheckPinRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckPinRequest. Expected element msisdnVerifyCheckPinRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckPinRequest. Expected element msisdnVerifyCheckPinRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCheckPinRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckPinRequest to XML under element name "msisdnVerifyCheckPinRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCheckPinRequest The MsisdnVerifyCheckPinRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckPinRequest 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 "msisdnVerifyCheckPinRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCheckPinRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCheckPinRequest for root element {}msisdnVerifyCheckPinRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCheckPinRequest for root element {}msisdnVerifyCheckPinRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCheckPinRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pin", 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 setPin: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_pin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}pin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pin."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCheckPinRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCheckPinRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCreateKeyRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyCreateKeyRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCreateKeyRequest

/**
 * The msisdn's sim provider (optional)
 */
- (NSString *) provider
{
  return _provider;
}

/**
 * The msisdn's sim provider (optional)
 */
- (void) setProvider: (NSString *) newProvider
{
  [newProvider retain];
  [_provider release];
  _provider = newProvider;
}

- (void) dealloc
{
  [self setProvider: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCreateKeyRequest *_mYSMSAPINS0MsisdnVerifyCreateKeyRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCreateKeyRequest = (MYSMSAPINS0MsisdnVerifyCreateKeyRequest *) [MYSMSAPINS0MsisdnVerifyCreateKeyRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCreateKeyRequest;
}

//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 MYSMSAPINS0MsisdnVerifyCreateKeyRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCreateKeyRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCreateKeyRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCreateKeyRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCreateKeyRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCreateKeyRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCreateKeyRequest *_mYSMSAPINS0MsisdnVerifyCreateKeyRequest = [[MYSMSAPINS0MsisdnVerifyCreateKeyRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCreateKeyRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCreateKeyRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCreateKeyRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyCreateKeyRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCreateKeyRequest 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 MYSMSAPINS0MsisdnVerifyCreateKeyRequest 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 MYSMSAPINS0MsisdnVerifyCreateKeyRequest from an XML reader. The element to be read is
 * "msisdnVerifyCreateKeyRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCreateKeyRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCreateKeyRequest *_msisdnVerifyCreateKeyRequest = 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 msisdnVerifyCreateKeyRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCreateKeyRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCreateKeyRequest.");
#endif
    _msisdnVerifyCreateKeyRequest = (MYSMSAPINS0MsisdnVerifyCreateKeyRequest *)[MYSMSAPINS0MsisdnVerifyCreateKeyRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCreateKeyRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCreateKeyRequest. Expected element msisdnVerifyCreateKeyRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCreateKeyRequest. Expected element msisdnVerifyCreateKeyRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCreateKeyRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCreateKeyRequest to XML under element name "msisdnVerifyCreateKeyRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCreateKeyRequest The MsisdnVerifyCreateKeyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCreateKeyRequest 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 "msisdnVerifyCreateKeyRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCreateKeyRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCreateKeyRequest for root element {}msisdnVerifyCreateKeyRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCreateKeyRequest for root element {}msisdnVerifyCreateKeyRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCreateKeyRequest. 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 "provider", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}provider of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}provider of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setProvider: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self provider]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "provider", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}provider."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}provider...");
#endif
    [[self provider] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}provider...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}provider."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCreateKeyRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCreateKeyRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyRequest

/**
 * The msisdn to verify
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The msisdn to verify
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * If set the verify pin is send as flash sms
 */
- (BOOL) flashSms
{
  return _flashSms;
}

/**
 * If set the verify pin is send as flash sms
 */
- (void) setFlashSms: (BOOL) newFlashSms
{
  _flashSms = newFlashSms;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyRequest *_mYSMSAPINS0MsisdnVerifyRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyRequest = (MYSMSAPINS0MsisdnVerifyRequest *) [MYSMSAPINS0MsisdnVerifyRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyRequest;
}

//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 MYSMSAPINS0MsisdnVerifyRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyRequest *_mYSMSAPINS0MsisdnVerifyRequest = [[MYSMSAPINS0MsisdnVerifyRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyRequest 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 MYSMSAPINS0MsisdnVerifyRequest 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 MYSMSAPINS0MsisdnVerifyRequest from an XML reader. The element to be read is
 * "msisdnVerifyRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyRequest *_msisdnVerifyRequest = 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 msisdnVerifyRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyRequest.");
#endif
    _msisdnVerifyRequest = (MYSMSAPINS0MsisdnVerifyRequest *)[MYSMSAPINS0MsisdnVerifyRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyRequest. Expected element msisdnVerifyRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyRequest. Expected element msisdnVerifyRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyRequest to XML under element name "msisdnVerifyRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyRequest The MsisdnVerifyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyRequest 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 "msisdnVerifyRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyRequest for root element {}msisdnVerifyRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyRequest for root element {}msisdnVerifyRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "flashSms", 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 setFlashSms: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "flashSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}flashSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}flashSms...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_flashSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}flashSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}flashSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}flashSms."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyRequest_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyStatusRequest_M
#define DEF_MYSMSAPINS0MsisdnVerifyStatusRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyStatusRequest

/**
 * The msisdn to verify
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The msisdn to verify
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyStatusRequest *_mYSMSAPINS0MsisdnVerifyStatusRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyStatusRequest = (MYSMSAPINS0MsisdnVerifyStatusRequest *) [MYSMSAPINS0MsisdnVerifyStatusRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyStatusRequest;
}

//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 MYSMSAPINS0MsisdnVerifyStatusRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyStatusRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyStatusRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyStatusRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyStatusRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyStatusRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyStatusRequest *_mYSMSAPINS0MsisdnVerifyStatusRequest = [[MYSMSAPINS0MsisdnVerifyStatusRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyStatusRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyStatusRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyStatusRequest autorelease];
  return _mYSMSAPINS0MsisdnVerifyStatusRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyStatusRequest 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 MYSMSAPINS0MsisdnVerifyStatusRequest 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 MYSMSAPINS0MsisdnVerifyStatusRequest from an XML reader. The element to be read is
 * "msisdnVerifyStatusRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyStatusRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyStatusRequest *_msisdnVerifyStatusRequest = 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 msisdnVerifyStatusRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyStatusRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyStatusRequest.");
#endif
    _msisdnVerifyStatusRequest = (MYSMSAPINS0MsisdnVerifyStatusRequest *)[MYSMSAPINS0MsisdnVerifyStatusRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyStatusRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyStatusRequest. Expected element msisdnVerifyStatusRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyStatusRequest. Expected element msisdnVerifyStatusRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyStatusRequest;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyStatusRequest to XML under element name "msisdnVerifyStatusRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyStatusRequest The MsisdnVerifyStatusRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyStatusRequest 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 "msisdnVerifyStatusRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyStatusRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyStatusRequest for root element {}msisdnVerifyStatusRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyStatusRequest for root element {}msisdnVerifyStatusRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyStatusRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyStatusRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyStatusRequest_M */
#ifndef DEF_MYSMSAPINS0ProUserAddRequest_M
#define DEF_MYSMSAPINS0ProUserAddRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ProUserAddRequest

/**
 * The pro type that should be checked<br/>
 * <br/>
 * 1 .. Android Tablet<br/>
 */
- (int) proType
{
  return _proType;
}

/**
 * The pro type that should be checked<br/>
 * <br/>
 * 1 .. Android Tablet<br/>
 */
- (void) setProType: (int) newProType
{
  _proType = newProType;
}

/**
 * The external id the pro user belongs to
 */
- (NSString *) externalId
{
  return _externalId;
}

/**
 * The external id the pro user belongs to
 */
- (void) setExternalId: (NSString *) newExternalId
{
  [newExternalId retain];
  [_externalId release];
  _externalId = newExternalId;
}

- (void) dealloc
{
  [self setExternalId: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ProUserAddRequest *_mYSMSAPINS0ProUserAddRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ProUserAddRequest = (MYSMSAPINS0ProUserAddRequest *) [MYSMSAPINS0ProUserAddRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ProUserAddRequest;
}

//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 MYSMSAPINS0ProUserAddRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ProUserAddRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ProUserAddRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ProUserAddRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ProUserAddRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ProUserAddRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ProUserAddRequest *_mYSMSAPINS0ProUserAddRequest = [[MYSMSAPINS0ProUserAddRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ProUserAddRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ProUserAddRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ProUserAddRequest autorelease];
  return _mYSMSAPINS0ProUserAddRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ProUserAddRequest 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 MYSMSAPINS0ProUserAddRequest 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 MYSMSAPINS0ProUserAddRequest from an XML reader. The element to be read is
 * "proUserAddRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ProUserAddRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ProUserAddRequest *_proUserAddRequest = 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 proUserAddRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "proUserAddRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}proUserAddRequest.");
#endif
    _proUserAddRequest = (MYSMSAPINS0ProUserAddRequest *)[MYSMSAPINS0ProUserAddRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}proUserAddRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserAddRequest. Expected element proUserAddRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserAddRequest. Expected element proUserAddRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _proUserAddRequest;
}

/**
 * Writes this MYSMSAPINS0ProUserAddRequest to XML under element name "proUserAddRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _proUserAddRequest The ProUserAddRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ProUserAddRequest 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 "proUserAddRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}proUserAddRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}proUserAddRequest for root element {}proUserAddRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}proUserAddRequest for root element {}proUserAddRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}proUserAddRequest. 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 "proType", 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 setProType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "externalId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}externalId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}externalId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setExternalId: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "proType", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}proType."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}proType...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_proType);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}proType...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}proType."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}proType."];
    }
  }
  if ([self externalId]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "externalId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}externalId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}externalId...");
#endif
    [[self externalId] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}externalId...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}externalId."];
    }
  }
}
@end /* implementation MYSMSAPINS0ProUserAddRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ProUserAddRequest_M */
#ifndef DEF_MYSMSAPINS0ProUserCheckRequest_M
#define DEF_MYSMSAPINS0ProUserCheckRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ProUserCheckRequest

/**
 * The pro type that should be checked<br/>
 * <br/>
 * 1 .. Android Tablet<br/>
 */
- (int) proType
{
  return _proType;
}

/**
 * The pro type that should be checked<br/>
 * <br/>
 * 1 .. Android Tablet<br/>
 */
- (void) setProType: (int) newProType
{
  _proType = newProType;
}

/**
 * The external ids that should be checked
 */
- (NSArray *) externalIds
{
  return _externalIds;
}

/**
 * The external ids that should be checked
 */
- (void) setExternalIds: (NSArray *) newExternalIds
{
  [newExternalIds retain];
  [_externalIds release];
  _externalIds = newExternalIds;
}

- (void) dealloc
{
  [self setExternalIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ProUserCheckRequest *_mYSMSAPINS0ProUserCheckRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ProUserCheckRequest = (MYSMSAPINS0ProUserCheckRequest *) [MYSMSAPINS0ProUserCheckRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ProUserCheckRequest;
}

//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 MYSMSAPINS0ProUserCheckRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ProUserCheckRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ProUserCheckRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ProUserCheckRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ProUserCheckRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ProUserCheckRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ProUserCheckRequest *_mYSMSAPINS0ProUserCheckRequest = [[MYSMSAPINS0ProUserCheckRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ProUserCheckRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ProUserCheckRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ProUserCheckRequest autorelease];
  return _mYSMSAPINS0ProUserCheckRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ProUserCheckRequest 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 MYSMSAPINS0ProUserCheckRequest 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 MYSMSAPINS0ProUserCheckRequest from an XML reader. The element to be read is
 * "proUserCheckRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ProUserCheckRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ProUserCheckRequest *_proUserCheckRequest = 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 proUserCheckRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "proUserCheckRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}proUserCheckRequest.");
#endif
    _proUserCheckRequest = (MYSMSAPINS0ProUserCheckRequest *)[MYSMSAPINS0ProUserCheckRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}proUserCheckRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserCheckRequest. Expected element proUserCheckRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserCheckRequest. Expected element proUserCheckRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _proUserCheckRequest;
}

/**
 * Writes this MYSMSAPINS0ProUserCheckRequest to XML under element name "proUserCheckRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _proUserCheckRequest The ProUserCheckRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ProUserCheckRequest 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 "proUserCheckRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}proUserCheckRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}proUserCheckRequest for root element {}proUserCheckRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}proUserCheckRequest for root element {}proUserCheckRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}proUserCheckRequest. 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 "proType", 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 setProType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "externalIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}externalIds of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

     __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}externalIds of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    if ([self externalIds]) {
      [self setExternalIds: [[self externalIds] arrayByAddingObject: __child]];
    }
    else {
      [self setExternalIds: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "proType", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}proType."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}proType...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_proType);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}proType...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}proType."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}proType."];
    }
  }
  if ([self externalIds]) {
    __enumerator = [[self externalIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "externalIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}externalIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}externalIds...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}externalIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}externalIds."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0ProUserCheckRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ProUserCheckRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationActivateMsisdnRequest_M
#define DEF_MYSMSAPINS0RegistrationActivateMsisdnRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationActivateMsisdnRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (int) msisdnVerifyPin
{
  return _msisdnVerifyPin;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (void) setMsisdnVerifyPin: (int) newMsisdnVerifyPin
{
  _msisdnVerifyPin = newMsisdnVerifyPin;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationActivateMsisdnRequest *_mYSMSAPINS0RegistrationActivateMsisdnRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationActivateMsisdnRequest = (MYSMSAPINS0RegistrationActivateMsisdnRequest *) [MYSMSAPINS0RegistrationActivateMsisdnRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationActivateMsisdnRequest;
}

//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 MYSMSAPINS0RegistrationActivateMsisdnRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationActivateMsisdnRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationActivateMsisdnRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationActivateMsisdnRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationActivateMsisdnRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationActivateMsisdnRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationActivateMsisdnRequest *_mYSMSAPINS0RegistrationActivateMsisdnRequest = [[MYSMSAPINS0RegistrationActivateMsisdnRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationActivateMsisdnRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationActivateMsisdnRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationActivateMsisdnRequest autorelease];
  return _mYSMSAPINS0RegistrationActivateMsisdnRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationActivateMsisdnRequest 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 MYSMSAPINS0RegistrationActivateMsisdnRequest 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 MYSMSAPINS0RegistrationActivateMsisdnRequest from an XML reader. The element to be read is
 * "registrationActivateMsisdnRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationActivateMsisdnRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationActivateMsisdnRequest *_registrationActivateMsisdnRequest = 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 registrationActivateMsisdnRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationActivateMsisdnRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationActivateMsisdnRequest.");
#endif
    _registrationActivateMsisdnRequest = (MYSMSAPINS0RegistrationActivateMsisdnRequest *)[MYSMSAPINS0RegistrationActivateMsisdnRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationActivateMsisdnRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateMsisdnRequest. Expected element registrationActivateMsisdnRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateMsisdnRequest. Expected element registrationActivateMsisdnRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationActivateMsisdnRequest;
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateMsisdnRequest to XML under element name "registrationActivateMsisdnRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationActivateMsisdnRequest The RegistrationActivateMsisdnRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateMsisdnRequest 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 "registrationActivateMsisdnRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationActivateMsisdnRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationActivateMsisdnRequest for root element {}registrationActivateMsisdnRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationActivateMsisdnRequest for root element {}registrationActivateMsisdnRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationActivateMsisdnRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdnVerifyPin", 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 setMsisdnVerifyPin: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdnVerifyPin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdnVerifyPin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdnVerifyPin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_msisdnVerifyPin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdnVerifyPin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdnVerifyPin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdnVerifyPin."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationActivateMsisdnRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationActivateMsisdnRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationActivateRequest_M
#define DEF_MYSMSAPINS0RegistrationActivateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationActivateRequest

/**
 * The registration key send to the they user or was sent by the user via sms.
 */
- (NSString *) registrationKey
{
  return _registrationKey;
}

/**
 * The registration key send to the they user or was sent by the user via sms.
 */
- (void) setRegistrationKey: (NSString *) newRegistrationKey
{
  [newRegistrationKey retain];
  [_registrationKey release];
  _registrationKey = newRegistrationKey;
}

- (void) dealloc
{
  [self setRegistrationKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationActivateRequest *_mYSMSAPINS0RegistrationActivateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationActivateRequest = (MYSMSAPINS0RegistrationActivateRequest *) [MYSMSAPINS0RegistrationActivateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationActivateRequest;
}

//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 MYSMSAPINS0RegistrationActivateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationActivateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationActivateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationActivateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationActivateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationActivateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationActivateRequest *_mYSMSAPINS0RegistrationActivateRequest = [[MYSMSAPINS0RegistrationActivateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationActivateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationActivateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationActivateRequest autorelease];
  return _mYSMSAPINS0RegistrationActivateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationActivateRequest 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 MYSMSAPINS0RegistrationActivateRequest 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 MYSMSAPINS0RegistrationActivateRequest from an XML reader. The element to be read is
 * "registrationActivateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationActivateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationActivateRequest *_registrationActivateRequest = 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 registrationActivateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationActivateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationActivateRequest.");
#endif
    _registrationActivateRequest = (MYSMSAPINS0RegistrationActivateRequest *)[MYSMSAPINS0RegistrationActivateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationActivateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateRequest. Expected element registrationActivateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateRequest. Expected element registrationActivateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationActivateRequest;
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateRequest to XML under element name "registrationActivateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationActivateRequest The RegistrationActivateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateRequest 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 "registrationActivateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationActivateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationActivateRequest for root element {}registrationActivateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationActivateRequest for root element {}registrationActivateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationActivateRequest. 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 "registrationKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}registrationKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}registrationKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRegistrationKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self registrationKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "registrationKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}registrationKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}registrationKey...");
#endif
    [[self registrationKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}registrationKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}registrationKey."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationActivateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationActivateRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationCheckMsisdnRequest_M
#define DEF_MYSMSAPINS0RegistrationCheckMsisdnRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCheckMsisdnRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCheckMsisdnRequest *_mYSMSAPINS0RegistrationCheckMsisdnRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCheckMsisdnRequest = (MYSMSAPINS0RegistrationCheckMsisdnRequest *) [MYSMSAPINS0RegistrationCheckMsisdnRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCheckMsisdnRequest;
}

//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 MYSMSAPINS0RegistrationCheckMsisdnRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCheckMsisdnRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCheckMsisdnRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCheckMsisdnRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCheckMsisdnRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCheckMsisdnRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCheckMsisdnRequest *_mYSMSAPINS0RegistrationCheckMsisdnRequest = [[MYSMSAPINS0RegistrationCheckMsisdnRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCheckMsisdnRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCheckMsisdnRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCheckMsisdnRequest autorelease];
  return _mYSMSAPINS0RegistrationCheckMsisdnRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCheckMsisdnRequest 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 MYSMSAPINS0RegistrationCheckMsisdnRequest 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 MYSMSAPINS0RegistrationCheckMsisdnRequest from an XML reader. The element to be read is
 * "registrationCheckMsisdnRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCheckMsisdnRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCheckMsisdnRequest *_registrationCheckMsisdnRequest = 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 registrationCheckMsisdnRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCheckMsisdnRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCheckMsisdnRequest.");
#endif
    _registrationCheckMsisdnRequest = (MYSMSAPINS0RegistrationCheckMsisdnRequest *)[MYSMSAPINS0RegistrationCheckMsisdnRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCheckMsisdnRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCheckMsisdnRequest. Expected element registrationCheckMsisdnRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCheckMsisdnRequest. Expected element registrationCheckMsisdnRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCheckMsisdnRequest;
}

/**
 * Writes this MYSMSAPINS0RegistrationCheckMsisdnRequest to XML under element name "registrationCheckMsisdnRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCheckMsisdnRequest The RegistrationCheckMsisdnRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCheckMsisdnRequest 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 "registrationCheckMsisdnRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCheckMsisdnRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCheckMsisdnRequest for root element {}registrationCheckMsisdnRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCheckMsisdnRequest for root element {}registrationCheckMsisdnRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCheckMsisdnRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationCheckMsisdnRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCheckMsisdnRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationCreateKeyRequest_M
#define DEF_MYSMSAPINS0RegistrationCreateKeyRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCreateKeyRequest

/**
 * The registration's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The registration's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

/**
 * The registration's sim provider (optional)
 */
- (NSString *) provider
{
  return _provider;
}

/**
 * The registration's sim provider (optional)
 */
- (void) setProvider: (NSString *) newProvider
{
  [newProvider retain];
  [_provider release];
  _provider = newProvider;
}

- (void) dealloc
{
  [self setPassword: nil];
  [self setProvider: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCreateKeyRequest *_mYSMSAPINS0RegistrationCreateKeyRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCreateKeyRequest = (MYSMSAPINS0RegistrationCreateKeyRequest *) [MYSMSAPINS0RegistrationCreateKeyRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCreateKeyRequest;
}

//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 MYSMSAPINS0RegistrationCreateKeyRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCreateKeyRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCreateKeyRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCreateKeyRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCreateKeyRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCreateKeyRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCreateKeyRequest *_mYSMSAPINS0RegistrationCreateKeyRequest = [[MYSMSAPINS0RegistrationCreateKeyRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCreateKeyRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCreateKeyRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCreateKeyRequest autorelease];
  return _mYSMSAPINS0RegistrationCreateKeyRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCreateKeyRequest 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 MYSMSAPINS0RegistrationCreateKeyRequest 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 MYSMSAPINS0RegistrationCreateKeyRequest from an XML reader. The element to be read is
 * "registrationCreateKeyRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCreateKeyRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCreateKeyRequest *_registrationCreateKeyRequest = 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 registrationCreateKeyRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCreateKeyRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCreateKeyRequest.");
#endif
    _registrationCreateKeyRequest = (MYSMSAPINS0RegistrationCreateKeyRequest *)[MYSMSAPINS0RegistrationCreateKeyRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCreateKeyRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateKeyRequest. Expected element registrationCreateKeyRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateKeyRequest. Expected element registrationCreateKeyRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCreateKeyRequest;
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateKeyRequest to XML under element name "registrationCreateKeyRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCreateKeyRequest The RegistrationCreateKeyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateKeyRequest 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 "registrationCreateKeyRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCreateKeyRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCreateKeyRequest for root element {}registrationCreateKeyRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCreateKeyRequest for root element {}registrationCreateKeyRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCreateKeyRequest. 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 "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "provider", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}provider of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}provider of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setProvider: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
  if ([self provider]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "provider", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}provider."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}provider...");
#endif
    [[self provider] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}provider...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}provider."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationCreateKeyRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCreateKeyRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationCreateRequest_M
#define DEF_MYSMSAPINS0RegistrationCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCreateRequest

/**
 * The registration's mobile number that needs to be verified
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The registration's mobile number that needs to be verified
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The registration's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The registration's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

/**
 * True if the parameter should be checked without trigger a registration.
 */
- (BOOL) test
{
  return _test;
}

/**
 * True if the parameter should be checked without trigger a registration.
 */
- (void) setTest: (BOOL) newTest
{
  _test = newTest;
}

- (void) dealloc
{
  [self setPassword: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCreateRequest *_mYSMSAPINS0RegistrationCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCreateRequest = (MYSMSAPINS0RegistrationCreateRequest *) [MYSMSAPINS0RegistrationCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCreateRequest;
}

//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 MYSMSAPINS0RegistrationCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCreateRequest *_mYSMSAPINS0RegistrationCreateRequest = [[MYSMSAPINS0RegistrationCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCreateRequest autorelease];
  return _mYSMSAPINS0RegistrationCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCreateRequest 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 MYSMSAPINS0RegistrationCreateRequest 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 MYSMSAPINS0RegistrationCreateRequest from an XML reader. The element to be read is
 * "registrationCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCreateRequest *_registrationCreateRequest = 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 registrationCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCreateRequest.");
#endif
    _registrationCreateRequest = (MYSMSAPINS0RegistrationCreateRequest *)[MYSMSAPINS0RegistrationCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateRequest. Expected element registrationCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateRequest. Expected element registrationCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCreateRequest;
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateRequest to XML under element name "registrationCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCreateRequest The RegistrationCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateRequest 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 "registrationCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCreateRequest for root element {}registrationCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCreateRequest for root element {}registrationCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCreateRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "test", 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 setTest: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "test", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}test."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}test...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_test);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}test...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}test."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}test."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCreateRequest_M */
#ifndef DEF_MYSMSAPINS0RegistrationCreateResponse_M
#define DEF_MYSMSAPINS0RegistrationCreateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCreateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCreateResponse *_mYSMSAPINS0RegistrationCreateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCreateResponse = (MYSMSAPINS0RegistrationCreateResponse *) [MYSMSAPINS0RegistrationCreateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCreateResponse;
}

//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 MYSMSAPINS0RegistrationCreateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCreateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCreateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCreateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCreateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCreateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCreateResponse *_mYSMSAPINS0RegistrationCreateResponse = [[MYSMSAPINS0RegistrationCreateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCreateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCreateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCreateResponse autorelease];
  return _mYSMSAPINS0RegistrationCreateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCreateResponse 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 MYSMSAPINS0RegistrationCreateResponse 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 MYSMSAPINS0RegistrationCreateResponse from an XML reader. The element to be read is
 * "registrationCreateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCreateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCreateResponse *_registrationCreateResponse = 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 registrationCreateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCreateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCreateResponse.");
#endif
    _registrationCreateResponse = (MYSMSAPINS0RegistrationCreateResponse *)[MYSMSAPINS0RegistrationCreateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCreateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateResponse. Expected element registrationCreateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateResponse. Expected element registrationCreateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCreateResponse;
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateResponse to XML under element name "registrationCreateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCreateResponse The RegistrationCreateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateResponse 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 "registrationCreateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCreateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCreateResponse for root element {}registrationCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCreateResponse for root element {}registrationCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCreateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RegistrationCreateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCreateResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteCallControlResponse_M
#define DEF_MYSMSAPINS0RemoteCallControlResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallControlResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallControlResponse *_mYSMSAPINS0RemoteCallControlResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallControlResponse = (MYSMSAPINS0RemoteCallControlResponse *) [MYSMSAPINS0RemoteCallControlResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallControlResponse;
}

//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 MYSMSAPINS0RemoteCallControlResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallControlResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallControlResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallControlResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallControlResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallControlResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallControlResponse *_mYSMSAPINS0RemoteCallControlResponse = [[MYSMSAPINS0RemoteCallControlResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallControlResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallControlResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallControlResponse autorelease];
  return _mYSMSAPINS0RemoteCallControlResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallControlResponse 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 MYSMSAPINS0RemoteCallControlResponse 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 MYSMSAPINS0RemoteCallControlResponse from an XML reader. The element to be read is
 * "remoteCallControlResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallControlResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallControlResponse *_remoteCallControlResponse = 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 remoteCallControlResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallControlResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallControlResponse.");
#endif
    _remoteCallControlResponse = (MYSMSAPINS0RemoteCallControlResponse *)[MYSMSAPINS0RemoteCallControlResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallControlResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallControlResponse. Expected element remoteCallControlResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallControlResponse. Expected element remoteCallControlResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallControlResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteCallControlResponse to XML under element name "remoteCallControlResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallControlResponse The RemoteCallControlResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallControlResponse 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 "remoteCallControlResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallControlResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallControlResponse for root element {}remoteCallControlResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallControlResponse for root element {}remoteCallControlResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallControlResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RemoteCallControlResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallControlResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteCallFailedResponse_M
#define DEF_MYSMSAPINS0RemoteCallFailedResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallFailedResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallFailedResponse *_mYSMSAPINS0RemoteCallFailedResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallFailedResponse = (MYSMSAPINS0RemoteCallFailedResponse *) [MYSMSAPINS0RemoteCallFailedResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallFailedResponse;
}

//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 MYSMSAPINS0RemoteCallFailedResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallFailedResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallFailedResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallFailedResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallFailedResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallFailedResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallFailedResponse *_mYSMSAPINS0RemoteCallFailedResponse = [[MYSMSAPINS0RemoteCallFailedResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallFailedResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallFailedResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallFailedResponse autorelease];
  return _mYSMSAPINS0RemoteCallFailedResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallFailedResponse 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 MYSMSAPINS0RemoteCallFailedResponse 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 MYSMSAPINS0RemoteCallFailedResponse from an XML reader. The element to be read is
 * "remoteCallFailedResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallFailedResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallFailedResponse *_remoteCallFailedResponse = 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 remoteCallFailedResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallFailedResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallFailedResponse.");
#endif
    _remoteCallFailedResponse = (MYSMSAPINS0RemoteCallFailedResponse *)[MYSMSAPINS0RemoteCallFailedResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallFailedResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallFailedResponse. Expected element remoteCallFailedResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallFailedResponse. Expected element remoteCallFailedResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallFailedResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteCallFailedResponse to XML under element name "remoteCallFailedResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallFailedResponse The RemoteCallFailedResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallFailedResponse 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 "remoteCallFailedResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallFailedResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallFailedResponse for root element {}remoteCallFailedResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallFailedResponse for root element {}remoteCallFailedResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallFailedResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RemoteCallFailedResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallFailedResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteCallInitiateResponse_M
#define DEF_MYSMSAPINS0RemoteCallInitiateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallInitiateResponse

/**
 * The request id of the remote sms send request.
 */
- (long long) requestId
{
  return _requestId;
}

/**
 * The request id of the remote sms send request.
 */
- (void) setRequestId: (long long) newRequestId
{
  _requestId = newRequestId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallInitiateResponse *_mYSMSAPINS0RemoteCallInitiateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallInitiateResponse = (MYSMSAPINS0RemoteCallInitiateResponse *) [MYSMSAPINS0RemoteCallInitiateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallInitiateResponse;
}

//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 MYSMSAPINS0RemoteCallInitiateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallInitiateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallInitiateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallInitiateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallInitiateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallInitiateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallInitiateResponse *_mYSMSAPINS0RemoteCallInitiateResponse = [[MYSMSAPINS0RemoteCallInitiateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallInitiateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallInitiateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallInitiateResponse autorelease];
  return _mYSMSAPINS0RemoteCallInitiateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallInitiateResponse 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 MYSMSAPINS0RemoteCallInitiateResponse 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 MYSMSAPINS0RemoteCallInitiateResponse from an XML reader. The element to be read is
 * "remoteCallInitiateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallInitiateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallInitiateResponse *_remoteCallInitiateResponse = 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 remoteCallInitiateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallInitiateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallInitiateResponse.");
#endif
    _remoteCallInitiateResponse = (MYSMSAPINS0RemoteCallInitiateResponse *)[MYSMSAPINS0RemoteCallInitiateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallInitiateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallInitiateResponse. Expected element remoteCallInitiateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallInitiateResponse. Expected element remoteCallInitiateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallInitiateResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteCallInitiateResponse to XML under element name "remoteCallInitiateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallInitiateResponse The RemoteCallInitiateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallInitiateResponse 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 "remoteCallInitiateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallInitiateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallInitiateResponse for root element {}remoteCallInitiateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallInitiateResponse for root element {}remoteCallInitiateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallInitiateResponse. 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 "requestId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRequestId: *((long long*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}requestId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}requestId...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_requestId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}requestId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}requestId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}requestId."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteCallInitiateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallInitiateResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsCancelResponse_M
#define DEF_MYSMSAPINS0RemoteSmsCancelResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsCancelResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsCancelResponse *_mYSMSAPINS0RemoteSmsCancelResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsCancelResponse = (MYSMSAPINS0RemoteSmsCancelResponse *) [MYSMSAPINS0RemoteSmsCancelResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsCancelResponse;
}

//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 MYSMSAPINS0RemoteSmsCancelResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsCancelResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsCancelResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsCancelResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsCancelResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsCancelResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsCancelResponse *_mYSMSAPINS0RemoteSmsCancelResponse = [[MYSMSAPINS0RemoteSmsCancelResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsCancelResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsCancelResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsCancelResponse autorelease];
  return _mYSMSAPINS0RemoteSmsCancelResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsCancelResponse 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 MYSMSAPINS0RemoteSmsCancelResponse 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 MYSMSAPINS0RemoteSmsCancelResponse from an XML reader. The element to be read is
 * "remoteSmsCancelResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsCancelResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsCancelResponse *_remoteSmsCancelResponse = 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 remoteSmsCancelResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsCancelResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsCancelResponse.");
#endif
    _remoteSmsCancelResponse = (MYSMSAPINS0RemoteSmsCancelResponse *)[MYSMSAPINS0RemoteSmsCancelResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsCancelResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsCancelResponse. Expected element remoteSmsCancelResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsCancelResponse. Expected element remoteSmsCancelResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsCancelResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsCancelResponse to XML under element name "remoteSmsCancelResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsCancelResponse The RemoteSmsCancelResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsCancelResponse 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 "remoteSmsCancelResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsCancelResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsCancelResponse for root element {}remoteSmsCancelResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsCancelResponse for root element {}remoteSmsCancelResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsCancelResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RemoteSmsCancelResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsCancelResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsFailedResponse_M
#define DEF_MYSMSAPINS0RemoteSmsFailedResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsFailedResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsFailedResponse *_mYSMSAPINS0RemoteSmsFailedResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsFailedResponse = (MYSMSAPINS0RemoteSmsFailedResponse *) [MYSMSAPINS0RemoteSmsFailedResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsFailedResponse;
}

//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 MYSMSAPINS0RemoteSmsFailedResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsFailedResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsFailedResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsFailedResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsFailedResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsFailedResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsFailedResponse *_mYSMSAPINS0RemoteSmsFailedResponse = [[MYSMSAPINS0RemoteSmsFailedResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsFailedResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsFailedResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsFailedResponse autorelease];
  return _mYSMSAPINS0RemoteSmsFailedResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsFailedResponse 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 MYSMSAPINS0RemoteSmsFailedResponse 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 MYSMSAPINS0RemoteSmsFailedResponse from an XML reader. The element to be read is
 * "remoteSmsFailedResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsFailedResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsFailedResponse *_remoteSmsFailedResponse = 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 remoteSmsFailedResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsFailedResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsFailedResponse.");
#endif
    _remoteSmsFailedResponse = (MYSMSAPINS0RemoteSmsFailedResponse *)[MYSMSAPINS0RemoteSmsFailedResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsFailedResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsFailedResponse. Expected element remoteSmsFailedResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsFailedResponse. Expected element remoteSmsFailedResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsFailedResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsFailedResponse to XML under element name "remoteSmsFailedResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsFailedResponse The RemoteSmsFailedResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsFailedResponse 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 "remoteSmsFailedResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsFailedResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsFailedResponse for root element {}remoteSmsFailedResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsFailedResponse for root element {}remoteSmsFailedResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsFailedResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RemoteSmsFailedResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsFailedResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsSendResponse_M
#define DEF_MYSMSAPINS0RemoteSmsSendResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsSendResponse

/**
 * The request id of the remote sms send request.
 */
- (long long) requestId
{
  return _requestId;
}

/**
 * The request id of the remote sms send request.
 */
- (void) setRequestId: (long long) newRequestId
{
  _requestId = newRequestId;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

/**
 * The acknowledge of sent messages.
 */
- (NSArray *) remoteSmsSendAcks
{
  return _remoteSmsSendAcks;
}

/**
 * The acknowledge of sent messages.
 */
- (void) setRemoteSmsSendAcks: (NSArray *) newRemoteSmsSendAcks
{
  [newRemoteSmsSendAcks retain];
  [_remoteSmsSendAcks release];
  _remoteSmsSendAcks = newRemoteSmsSendAcks;
}

- (void) dealloc
{
  [self setDateSent: nil];
  [self setRemoteSmsSendAcks: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsSendResponse *_mYSMSAPINS0RemoteSmsSendResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsSendResponse = (MYSMSAPINS0RemoteSmsSendResponse *) [MYSMSAPINS0RemoteSmsSendResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsSendResponse;
}

//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 MYSMSAPINS0RemoteSmsSendResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsSendResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsSendResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsSendResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsSendResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsSendResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsSendResponse *_mYSMSAPINS0RemoteSmsSendResponse = [[MYSMSAPINS0RemoteSmsSendResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsSendResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsSendResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsSendResponse autorelease];
  return _mYSMSAPINS0RemoteSmsSendResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsSendResponse 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 MYSMSAPINS0RemoteSmsSendResponse 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 MYSMSAPINS0RemoteSmsSendResponse from an XML reader. The element to be read is
 * "remoteSmsSendResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsSendResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsSendResponse *_remoteSmsSendResponse = 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 remoteSmsSendResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsSendResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsSendResponse.");
#endif
    _remoteSmsSendResponse = (MYSMSAPINS0RemoteSmsSendResponse *)[MYSMSAPINS0RemoteSmsSendResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsSendResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSendResponse. Expected element remoteSmsSendResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSendResponse. Expected element remoteSmsSendResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsSendResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSendResponse to XML under element name "remoteSmsSendResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsSendResponse The RemoteSmsSendResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSendResponse 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 "remoteSmsSendResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsSendResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsSendResponse for root element {}remoteSmsSendResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsSendResponse for root element {}remoteSmsSendResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsSendResponse. 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 "requestId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRequestId: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSent: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "remoteSmsSendAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}remoteSmsSendAcks of type {}remoteSmsSendAck.");
#endif

     __child = [MYSMSAPINS0RemoteSmsSendAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}remoteSmsSendAcks of type {}remoteSmsSendAck.");
#endif

    if ([self remoteSmsSendAcks]) {
      [self setRemoteSmsSendAcks: [[self remoteSmsSendAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setRemoteSmsSendAcks: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}requestId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}requestId...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_requestId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}requestId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}requestId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}requestId."];
    }
  }
  if ([self dateSent]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSent...");
#endif
    [[self dateSent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSent...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSent."];
    }
  }
  if ([self remoteSmsSendAcks]) {
    __enumerator = [[self remoteSmsSendAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "remoteSmsSendAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}remoteSmsSendAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}remoteSmsSendAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}remoteSmsSendAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}remoteSmsSendAcks."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsSendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsSendResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsSentResponse_M
#define DEF_MYSMSAPINS0RemoteSmsSentResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsSentResponse

/**
 * The (server) message id for the message.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id for the message.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsSentResponse *_mYSMSAPINS0RemoteSmsSentResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsSentResponse = (MYSMSAPINS0RemoteSmsSentResponse *) [MYSMSAPINS0RemoteSmsSentResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsSentResponse;
}

//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 MYSMSAPINS0RemoteSmsSentResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsSentResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsSentResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsSentResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsSentResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsSentResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsSentResponse *_mYSMSAPINS0RemoteSmsSentResponse = [[MYSMSAPINS0RemoteSmsSentResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsSentResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsSentResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsSentResponse autorelease];
  return _mYSMSAPINS0RemoteSmsSentResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsSentResponse 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 MYSMSAPINS0RemoteSmsSentResponse 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 MYSMSAPINS0RemoteSmsSentResponse from an XML reader. The element to be read is
 * "remoteSmsSentResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsSentResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsSentResponse *_remoteSmsSentResponse = 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 remoteSmsSentResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsSentResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsSentResponse.");
#endif
    _remoteSmsSentResponse = (MYSMSAPINS0RemoteSmsSentResponse *)[MYSMSAPINS0RemoteSmsSentResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsSentResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSentResponse. Expected element remoteSmsSentResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSentResponse. Expected element remoteSmsSentResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsSentResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSentResponse to XML under element name "remoteSmsSentResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsSentResponse The RemoteSmsSentResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSentResponse 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 "remoteSmsSentResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsSentResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsSentResponse for root element {}remoteSmsSentResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsSentResponse for root element {}remoteSmsSentResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsSentResponse. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsSentResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsSentResponse_M */
#ifndef DEF_MYSMSAPINS0ShopCheckPaymentResponse_M
#define DEF_MYSMSAPINS0ShopCheckPaymentResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopCheckPaymentResponse

/**
 * This is true if the payment was successful, otherwise the payment needs
 * perhaps a redirect or some time too complete.
 */
- (BOOL) payed
{
  return _payed;
}

/**
 * This is true if the payment was successful, otherwise the payment needs
 * perhaps a redirect or some time too complete.
 */
- (void) setPayed: (BOOL) newPayed
{
  _payed = newPayed;
}

/**
 * The redirect url where to user should go with a browser to complete the request.
 * After completion (ok or nok) the browser window will be closed. Use the check payment
 * request to get status.
 */
- (NSString *) redirectUrl
{
  return _redirectUrl;
}

/**
 * The redirect url where to user should go with a browser to complete the request.
 * After completion (ok or nok) the browser window will be closed. Use the check payment
 * request to get status.
 */
- (void) setRedirectUrl: (NSString *) newRedirectUrl
{
  [newRedirectUrl retain];
  [_redirectUrl release];
  _redirectUrl = newRedirectUrl;
}

- (void) dealloc
{
  [self setRedirectUrl: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopCheckPaymentResponse *_mYSMSAPINS0ShopCheckPaymentResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopCheckPaymentResponse = (MYSMSAPINS0ShopCheckPaymentResponse *) [MYSMSAPINS0ShopCheckPaymentResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopCheckPaymentResponse;
}

//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 MYSMSAPINS0ShopCheckPaymentResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopCheckPaymentResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopCheckPaymentResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopCheckPaymentResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopCheckPaymentResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopCheckPaymentResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopCheckPaymentResponse *_mYSMSAPINS0ShopCheckPaymentResponse = [[MYSMSAPINS0ShopCheckPaymentResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopCheckPaymentResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopCheckPaymentResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopCheckPaymentResponse autorelease];
  return _mYSMSAPINS0ShopCheckPaymentResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopCheckPaymentResponse 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 MYSMSAPINS0ShopCheckPaymentResponse 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 MYSMSAPINS0ShopCheckPaymentResponse from an XML reader. The element to be read is
 * "shopCheckPaymentResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopCheckPaymentResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopCheckPaymentResponse *_shopCheckPaymentResponse = 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 shopCheckPaymentResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopCheckPaymentResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopCheckPaymentResponse.");
#endif
    _shopCheckPaymentResponse = (MYSMSAPINS0ShopCheckPaymentResponse *)[MYSMSAPINS0ShopCheckPaymentResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopCheckPaymentResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopCheckPaymentResponse. Expected element shopCheckPaymentResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopCheckPaymentResponse. Expected element shopCheckPaymentResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopCheckPaymentResponse;
}

/**
 * Writes this MYSMSAPINS0ShopCheckPaymentResponse to XML under element name "shopCheckPaymentResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopCheckPaymentResponse The ShopCheckPaymentResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopCheckPaymentResponse 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 "shopCheckPaymentResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopCheckPaymentResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopCheckPaymentResponse for root element {}shopCheckPaymentResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopCheckPaymentResponse for root element {}shopCheckPaymentResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopCheckPaymentResponse. 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 "payed", 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 setPayed: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "redirectUrl", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}redirectUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}redirectUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRedirectUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "payed", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}payed."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}payed...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_payed);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}payed...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}payed."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}payed."];
    }
  }
  if ([self redirectUrl]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "redirectUrl", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}redirectUrl."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}redirectUrl...");
#endif
    [[self redirectUrl] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}redirectUrl...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}redirectUrl."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopCheckPaymentResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopCheckPaymentResponse_M */
#ifndef DEF_MYSMSAPINS0ShopGetPaymentMethodsResponse_M
#define DEF_MYSMSAPINS0ShopGetPaymentMethodsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopGetPaymentMethodsResponse

/**
 * (no documentation provided)
 */
- (NSArray *) paymentMethods
{
  return _paymentMethods;
}

/**
 * (no documentation provided)
 */
- (void) setPaymentMethods: (NSArray *) newPaymentMethods
{
  [newPaymentMethods retain];
  [_paymentMethods release];
  _paymentMethods = newPaymentMethods;
}

- (void) dealloc
{
  [self setPaymentMethods: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopGetPaymentMethodsResponse *_mYSMSAPINS0ShopGetPaymentMethodsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopGetPaymentMethodsResponse = (MYSMSAPINS0ShopGetPaymentMethodsResponse *) [MYSMSAPINS0ShopGetPaymentMethodsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopGetPaymentMethodsResponse;
}

//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 MYSMSAPINS0ShopGetPaymentMethodsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopGetPaymentMethodsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopGetPaymentMethodsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopGetPaymentMethodsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopGetPaymentMethodsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopGetPaymentMethodsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopGetPaymentMethodsResponse *_mYSMSAPINS0ShopGetPaymentMethodsResponse = [[MYSMSAPINS0ShopGetPaymentMethodsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopGetPaymentMethodsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopGetPaymentMethodsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopGetPaymentMethodsResponse autorelease];
  return _mYSMSAPINS0ShopGetPaymentMethodsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopGetPaymentMethodsResponse 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 MYSMSAPINS0ShopGetPaymentMethodsResponse 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 MYSMSAPINS0ShopGetPaymentMethodsResponse from an XML reader. The element to be read is
 * "shopGetPaymentMethodsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopGetPaymentMethodsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopGetPaymentMethodsResponse *_shopGetPaymentMethodsResponse = 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 shopGetPaymentMethodsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopGetPaymentMethodsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopGetPaymentMethodsResponse.");
#endif
    _shopGetPaymentMethodsResponse = (MYSMSAPINS0ShopGetPaymentMethodsResponse *)[MYSMSAPINS0ShopGetPaymentMethodsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopGetPaymentMethodsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopGetPaymentMethodsResponse. Expected element shopGetPaymentMethodsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopGetPaymentMethodsResponse. Expected element shopGetPaymentMethodsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopGetPaymentMethodsResponse;
}

/**
 * Writes this MYSMSAPINS0ShopGetPaymentMethodsResponse to XML under element name "shopGetPaymentMethodsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopGetPaymentMethodsResponse The ShopGetPaymentMethodsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopGetPaymentMethodsResponse 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 "shopGetPaymentMethodsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopGetPaymentMethodsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopGetPaymentMethodsResponse for root element {}shopGetPaymentMethodsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopGetPaymentMethodsResponse for root element {}shopGetPaymentMethodsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopGetPaymentMethodsResponse. 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 "paymentMethods", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}paymentMethods of type {}shopPaymentMethod.");
#endif

     __child = [MYSMSAPINS0ShopPaymentMethod readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}paymentMethods of type {}shopPaymentMethod.");
#endif

    if ([self paymentMethods]) {
      [self setPaymentMethods: [[self paymentMethods] arrayByAddingObject: __child]];
    }
    else {
      [self setPaymentMethods: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self paymentMethods]) {
    __enumerator = [[self paymentMethods] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethods", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}paymentMethods."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}paymentMethods...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}paymentMethods...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}paymentMethods."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0ShopGetPaymentMethodsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopGetPaymentMethodsResponse_M */
#ifndef DEF_MYSMSAPINS0ShopRedeemTokenResponse_M
#define DEF_MYSMSAPINS0ShopRedeemTokenResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopRedeemTokenResponse

/**
 * Gives the amount of free sms that ware added to the balance for this token.
 */
- (int) smsFree
{
  return _smsFree;
}

/**
 * Gives the amount of free sms that ware added to the balance for this token.
 */
- (void) setSmsFree: (int) newSmsFree
{
  _smsFree = newSmsFree;
}

/**
 * Gives the amount of months the subscription is activated for this token.
 */
- (int) subscriptionLength
{
  return _subscriptionLength;
}

/**
 * Gives the amount of months the subscription is activated for this token.
 */
- (void) setSubscriptionLength: (int) newSubscriptionLength
{
  _subscriptionLength = newSubscriptionLength;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopRedeemTokenResponse *_mYSMSAPINS0ShopRedeemTokenResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopRedeemTokenResponse = (MYSMSAPINS0ShopRedeemTokenResponse *) [MYSMSAPINS0ShopRedeemTokenResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopRedeemTokenResponse;
}

//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 MYSMSAPINS0ShopRedeemTokenResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopRedeemTokenResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopRedeemTokenResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopRedeemTokenResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopRedeemTokenResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopRedeemTokenResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopRedeemTokenResponse *_mYSMSAPINS0ShopRedeemTokenResponse = [[MYSMSAPINS0ShopRedeemTokenResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopRedeemTokenResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopRedeemTokenResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopRedeemTokenResponse autorelease];
  return _mYSMSAPINS0ShopRedeemTokenResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopRedeemTokenResponse 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 MYSMSAPINS0ShopRedeemTokenResponse 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 MYSMSAPINS0ShopRedeemTokenResponse from an XML reader. The element to be read is
 * "shopRedeemTokenResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopRedeemTokenResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopRedeemTokenResponse *_shopRedeemTokenResponse = 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 shopRedeemTokenResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopRedeemTokenResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopRedeemTokenResponse.");
#endif
    _shopRedeemTokenResponse = (MYSMSAPINS0ShopRedeemTokenResponse *)[MYSMSAPINS0ShopRedeemTokenResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopRedeemTokenResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopRedeemTokenResponse. Expected element shopRedeemTokenResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopRedeemTokenResponse. Expected element shopRedeemTokenResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopRedeemTokenResponse;
}

/**
 * Writes this MYSMSAPINS0ShopRedeemTokenResponse to XML under element name "shopRedeemTokenResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopRedeemTokenResponse The ShopRedeemTokenResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopRedeemTokenResponse 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 "shopRedeemTokenResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopRedeemTokenResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopRedeemTokenResponse for root element {}shopRedeemTokenResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopRedeemTokenResponse for root element {}shopRedeemTokenResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopRedeemTokenResponse. 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 "smsFree", 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 setSmsFree: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "subscriptionLength", 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 setSubscriptionLength: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsFree", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsFree."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsFree...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsFree);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsFree...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsFree."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsFree."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionLength", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}subscriptionLength."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}subscriptionLength...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_subscriptionLength);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}subscriptionLength...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}subscriptionLength."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subscriptionLength."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopRedeemTokenResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopRedeemTokenResponse_M */
#ifndef DEF_MYSMSAPINS0SmsSendResponse_M
#define DEF_MYSMSAPINS0SmsSendResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsSendResponse

/**
 * The number of sent sms
 */
- (int) sent
{
  return _sent;
}

/**
 * The number of sent sms
 */
- (void) setSent: (int) newSent
{
  _sent = newSent;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

/**
 * The acknowledge of sent messages.
 */
- (NSArray *) smsSendAcks
{
  return _smsSendAcks;
}

/**
 * The acknowledge of sent messages.
 */
- (void) setSmsSendAcks: (NSArray *) newSmsSendAcks
{
  [newSmsSendAcks retain];
  [_smsSendAcks release];
  _smsSendAcks = newSmsSendAcks;
}

- (void) dealloc
{
  [self setDateSent: nil];
  [self setSmsSendAcks: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsSendResponse *_mYSMSAPINS0SmsSendResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsSendResponse = (MYSMSAPINS0SmsSendResponse *) [MYSMSAPINS0SmsSendResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsSendResponse;
}

//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 MYSMSAPINS0SmsSendResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsSendResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsSendResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsSendResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsSendResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsSendResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsSendResponse *_mYSMSAPINS0SmsSendResponse = [[MYSMSAPINS0SmsSendResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsSendResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsSendResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsSendResponse autorelease];
  return _mYSMSAPINS0SmsSendResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsSendResponse 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 MYSMSAPINS0SmsSendResponse 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 MYSMSAPINS0SmsSendResponse from an XML reader. The element to be read is
 * "smsSendResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsSendResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsSendResponse *_smsSendResponse = 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 smsSendResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsSendResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsSendResponse.");
#endif
    _smsSendResponse = (MYSMSAPINS0SmsSendResponse *)[MYSMSAPINS0SmsSendResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsSendResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendResponse. Expected element smsSendResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendResponse. Expected element smsSendResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsSendResponse;
}

/**
 * Writes this MYSMSAPINS0SmsSendResponse to XML under element name "smsSendResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsSendResponse The SmsSendResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsSendResponse 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 "smsSendResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsSendResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsSendResponse for root element {}smsSendResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsSendResponse for root element {}smsSendResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsSendResponse. 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 "sent", 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 setSent: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSent: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsSendAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}smsSendAcks of type {}smsSendAck.");
#endif

     __child = [MYSMSAPINS0SmsSendAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}smsSendAcks of type {}smsSendAck.");
#endif

    if ([self smsSendAcks]) {
      [self setSmsSendAcks: [[self smsSendAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSmsSendAcks: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}sent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}sent...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_sent);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}sent...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}sent."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}sent."];
    }
  }
  if ([self dateSent]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSent...");
#endif
    [[self dateSent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSent...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSent."];
    }
  }
  if ([self smsSendAcks]) {
    __enumerator = [[self smsSendAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsSendAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}smsSendAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}smsSendAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}smsSendAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}smsSendAcks."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0SmsSendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsSendResponse_M */
#ifndef DEF_MYSMSAPINS0SmsSendSponsoredResponse_M
#define DEF_MYSMSAPINS0SmsSendSponsoredResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsSendSponsoredResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsSendSponsoredResponse *_mYSMSAPINS0SmsSendSponsoredResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsSendSponsoredResponse = (MYSMSAPINS0SmsSendSponsoredResponse *) [MYSMSAPINS0SmsSendSponsoredResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsSendSponsoredResponse;
}

//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 MYSMSAPINS0SmsSendSponsoredResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsSendSponsoredResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsSendSponsoredResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsSendSponsoredResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsSendSponsoredResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsSendSponsoredResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsSendSponsoredResponse *_mYSMSAPINS0SmsSendSponsoredResponse = [[MYSMSAPINS0SmsSendSponsoredResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsSendSponsoredResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsSendSponsoredResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsSendSponsoredResponse autorelease];
  return _mYSMSAPINS0SmsSendSponsoredResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsSendSponsoredResponse 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 MYSMSAPINS0SmsSendSponsoredResponse 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 MYSMSAPINS0SmsSendSponsoredResponse from an XML reader. The element to be read is
 * "smsSendSponsoredResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsSendSponsoredResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsSendSponsoredResponse *_smsSendSponsoredResponse = 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 smsSendSponsoredResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsSendSponsoredResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsSendSponsoredResponse.");
#endif
    _smsSendSponsoredResponse = (MYSMSAPINS0SmsSendSponsoredResponse *)[MYSMSAPINS0SmsSendSponsoredResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsSendSponsoredResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendSponsoredResponse. Expected element smsSendSponsoredResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendSponsoredResponse. Expected element smsSendSponsoredResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsSendSponsoredResponse;
}

/**
 * Writes this MYSMSAPINS0SmsSendSponsoredResponse to XML under element name "smsSendSponsoredResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsSendSponsoredResponse The SmsSendSponsoredResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsSendSponsoredResponse 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 "smsSendSponsoredResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsSendSponsoredResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsSendSponsoredResponse for root element {}smsSendSponsoredResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsSendSponsoredResponse for root element {}smsSendSponsoredResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsSendSponsoredResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0SmsSendSponsoredResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsSendSponsoredResponse_M */
#ifndef DEF_MYSMSAPINS0SmsConnectorCreateResponse_M
#define DEF_MYSMSAPINS0SmsConnectorCreateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsConnectorCreateResponse

/**
 * The newly created sms connector
 */
- (MYSMSAPINS0SmsConnector *) smsConnector
{
  return _smsConnector;
}

/**
 * The newly created sms connector
 */
- (void) setSmsConnector: (MYSMSAPINS0SmsConnector *) newSmsConnector
{
  [newSmsConnector retain];
  [_smsConnector release];
  _smsConnector = newSmsConnector;
}

- (void) dealloc
{
  [self setSmsConnector: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsConnectorCreateResponse *_mYSMSAPINS0SmsConnectorCreateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsConnectorCreateResponse = (MYSMSAPINS0SmsConnectorCreateResponse *) [MYSMSAPINS0SmsConnectorCreateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsConnectorCreateResponse;
}

//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 MYSMSAPINS0SmsConnectorCreateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsConnectorCreateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsConnectorCreateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsConnectorCreateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsConnectorCreateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsConnectorCreateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsConnectorCreateResponse *_mYSMSAPINS0SmsConnectorCreateResponse = [[MYSMSAPINS0SmsConnectorCreateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsConnectorCreateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsConnectorCreateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsConnectorCreateResponse autorelease];
  return _mYSMSAPINS0SmsConnectorCreateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsConnectorCreateResponse 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 MYSMSAPINS0SmsConnectorCreateResponse 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 MYSMSAPINS0SmsConnectorCreateResponse from an XML reader. The element to be read is
 * "smsConnectorCreateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsConnectorCreateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsConnectorCreateResponse *_smsConnectorCreateResponse = 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 smsConnectorCreateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsConnectorCreateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsConnectorCreateResponse.");
#endif
    _smsConnectorCreateResponse = (MYSMSAPINS0SmsConnectorCreateResponse *)[MYSMSAPINS0SmsConnectorCreateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsConnectorCreateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorCreateResponse. Expected element smsConnectorCreateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorCreateResponse. Expected element smsConnectorCreateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsConnectorCreateResponse;
}

/**
 * Writes this MYSMSAPINS0SmsConnectorCreateResponse to XML under element name "smsConnectorCreateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsConnectorCreateResponse The SmsConnectorCreateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsConnectorCreateResponse 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 "smsConnectorCreateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsConnectorCreateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsConnectorCreateResponse for root element {}smsConnectorCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsConnectorCreateResponse for root element {}smsConnectorCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsConnectorCreateResponse. 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 "smsConnector", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}smsConnector of type {}smsConnector.");
#endif
    __child = [MYSMSAPINS0SmsConnector readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}smsConnector of type {}smsConnector.");
#endif

    [self setSmsConnector: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self smsConnector]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnector", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnector."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsConnector...");
#endif
    [[self smsConnector] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsConnector...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsConnector."];
    }
  }
}
@end /* implementation MYSMSAPINS0SmsConnectorCreateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsConnectorCreateResponse_M */
#ifndef DEF_MYSMSAPINS0SmsConnectorGetConnectorsResponse_M
#define DEF_MYSMSAPINS0SmsConnectorGetConnectorsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsConnectorGetConnectorsResponse

/**
 * The list of sms connectors.
 */
- (NSArray *) connectors
{
  return _connectors;
}

/**
 * The list of sms connectors.
 */
- (void) setConnectors: (NSArray *) newConnectors
{
  [newConnectors retain];
  [_connectors release];
  _connectors = newConnectors;
}

- (void) dealloc
{
  [self setConnectors: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsConnectorGetConnectorsResponse *_mYSMSAPINS0SmsConnectorGetConnectorsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsConnectorGetConnectorsResponse = (MYSMSAPINS0SmsConnectorGetConnectorsResponse *) [MYSMSAPINS0SmsConnectorGetConnectorsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsConnectorGetConnectorsResponse;
}

//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 MYSMSAPINS0SmsConnectorGetConnectorsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsConnectorGetConnectorsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsConnectorGetConnectorsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsConnectorGetConnectorsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsConnectorGetConnectorsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsConnectorGetConnectorsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsConnectorGetConnectorsResponse *_mYSMSAPINS0SmsConnectorGetConnectorsResponse = [[MYSMSAPINS0SmsConnectorGetConnectorsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsConnectorGetConnectorsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsConnectorGetConnectorsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsConnectorGetConnectorsResponse autorelease];
  return _mYSMSAPINS0SmsConnectorGetConnectorsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsConnectorGetConnectorsResponse 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 MYSMSAPINS0SmsConnectorGetConnectorsResponse 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 MYSMSAPINS0SmsConnectorGetConnectorsResponse from an XML reader. The element to be read is
 * "smsConnectorGetConnectorsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsConnectorGetConnectorsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsConnectorGetConnectorsResponse *_smsConnectorGetConnectorsResponse = 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 smsConnectorGetConnectorsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsConnectorGetConnectorsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsConnectorGetConnectorsResponse.");
#endif
    _smsConnectorGetConnectorsResponse = (MYSMSAPINS0SmsConnectorGetConnectorsResponse *)[MYSMSAPINS0SmsConnectorGetConnectorsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsConnectorGetConnectorsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorGetConnectorsResponse. Expected element smsConnectorGetConnectorsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorGetConnectorsResponse. Expected element smsConnectorGetConnectorsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsConnectorGetConnectorsResponse;
}

/**
 * Writes this MYSMSAPINS0SmsConnectorGetConnectorsResponse to XML under element name "smsConnectorGetConnectorsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsConnectorGetConnectorsResponse The SmsConnectorGetConnectorsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsConnectorGetConnectorsResponse 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 "smsConnectorGetConnectorsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsConnectorGetConnectorsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsConnectorGetConnectorsResponse for root element {}smsConnectorGetConnectorsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsConnectorGetConnectorsResponse for root element {}smsConnectorGetConnectorsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsConnectorGetConnectorsResponse. 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 "connectors", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}connectors of type {}smsConnector.");
#endif

     __child = [MYSMSAPINS0SmsConnector readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}connectors of type {}smsConnector.");
#endif

    if ([self connectors]) {
      [self setConnectors: [[self connectors] arrayByAddingObject: __child]];
    }
    else {
      [self setConnectors: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self connectors]) {
    __enumerator = [[self connectors] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "connectors", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}connectors."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}connectors...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}connectors...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}connectors."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0SmsConnectorGetConnectorsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsConnectorGetConnectorsResponse_M */
#ifndef DEF_MYSMSAPINS0TypingFireEventResponse_M
#define DEF_MYSMSAPINS0TypingFireEventResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0TypingFireEventResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0TypingFireEventResponse *_mYSMSAPINS0TypingFireEventResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0TypingFireEventResponse = (MYSMSAPINS0TypingFireEventResponse *) [MYSMSAPINS0TypingFireEventResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0TypingFireEventResponse;
}

//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 MYSMSAPINS0TypingFireEventResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0TypingFireEventResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0TypingFireEventResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0TypingFireEventResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0TypingFireEventResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0TypingFireEventResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0TypingFireEventResponse *_mYSMSAPINS0TypingFireEventResponse = [[MYSMSAPINS0TypingFireEventResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0TypingFireEventResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0TypingFireEventResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0TypingFireEventResponse autorelease];
  return _mYSMSAPINS0TypingFireEventResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0TypingFireEventResponse 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 MYSMSAPINS0TypingFireEventResponse 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 MYSMSAPINS0TypingFireEventResponse from an XML reader. The element to be read is
 * "typingFireEventResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0TypingFireEventResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0TypingFireEventResponse *_typingFireEventResponse = 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 typingFireEventResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "typingFireEventResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}typingFireEventResponse.");
#endif
    _typingFireEventResponse = (MYSMSAPINS0TypingFireEventResponse *)[MYSMSAPINS0TypingFireEventResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}typingFireEventResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0TypingFireEventResponse. Expected element typingFireEventResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0TypingFireEventResponse. Expected element typingFireEventResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _typingFireEventResponse;
}

/**
 * Writes this MYSMSAPINS0TypingFireEventResponse to XML under element name "typingFireEventResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _typingFireEventResponse The TypingFireEventResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0TypingFireEventResponse 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 "typingFireEventResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}typingFireEventResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}typingFireEventResponse for root element {}typingFireEventResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}typingFireEventResponse for root element {}typingFireEventResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}typingFireEventResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0TypingFireEventResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0TypingFireEventResponse_M */
#ifndef DEF_MYSMSAPINS0UserCreateRequest_M
#define DEF_MYSMSAPINS0UserCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCreateRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The user's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The user's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (int) msisdnVerifyPin
{
  return _msisdnVerifyPin;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (void) setMsisdnVerifyPin: (int) newMsisdnVerifyPin
{
  _msisdnVerifyPin = newMsisdnVerifyPin;
}

- (void) dealloc
{
  [self setPassword: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCreateRequest *_mYSMSAPINS0UserCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCreateRequest = (MYSMSAPINS0UserCreateRequest *) [MYSMSAPINS0UserCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCreateRequest;
}

//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 MYSMSAPINS0UserCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCreateRequest *_mYSMSAPINS0UserCreateRequest = [[MYSMSAPINS0UserCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCreateRequest autorelease];
  return _mYSMSAPINS0UserCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCreateRequest 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 MYSMSAPINS0UserCreateRequest 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 MYSMSAPINS0UserCreateRequest from an XML reader. The element to be read is
 * "userCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCreateRequest *_userCreateRequest = 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 userCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCreateRequest.");
#endif
    _userCreateRequest = (MYSMSAPINS0UserCreateRequest *)[MYSMSAPINS0UserCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCreateRequest. Expected element userCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCreateRequest. Expected element userCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCreateRequest;
}

/**
 * Writes this MYSMSAPINS0UserCreateRequest to XML under element name "userCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCreateRequest The UserCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCreateRequest 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 "userCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCreateRequest for root element {}userCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCreateRequest for root element {}userCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCreateRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdnVerifyPin", 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 setMsisdnVerifyPin: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdnVerifyPin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdnVerifyPin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdnVerifyPin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_msisdnVerifyPin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdnVerifyPin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdnVerifyPin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdnVerifyPin."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCreateRequest_M */
#ifndef DEF_MYSMSAPINS0UserCreateResponse_M
#define DEF_MYSMSAPINS0UserCreateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCreateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCreateResponse *_mYSMSAPINS0UserCreateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCreateResponse = (MYSMSAPINS0UserCreateResponse *) [MYSMSAPINS0UserCreateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCreateResponse;
}

//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 MYSMSAPINS0UserCreateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCreateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCreateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCreateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCreateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCreateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCreateResponse *_mYSMSAPINS0UserCreateResponse = [[MYSMSAPINS0UserCreateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCreateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCreateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCreateResponse autorelease];
  return _mYSMSAPINS0UserCreateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCreateResponse 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 MYSMSAPINS0UserCreateResponse 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 MYSMSAPINS0UserCreateResponse from an XML reader. The element to be read is
 * "userCreateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCreateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCreateResponse *_userCreateResponse = 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 userCreateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCreateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCreateResponse.");
#endif
    _userCreateResponse = (MYSMSAPINS0UserCreateResponse *)[MYSMSAPINS0UserCreateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCreateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCreateResponse. Expected element userCreateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCreateResponse. Expected element userCreateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCreateResponse;
}

/**
 * Writes this MYSMSAPINS0UserCreateResponse to XML under element name "userCreateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCreateResponse The UserCreateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCreateResponse 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 "userCreateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCreateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCreateResponse for root element {}userCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCreateResponse for root element {}userCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCreateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCreateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCreateResponse_M */
#ifndef DEF_MYSMSAPINS0UserDeleteResponse_M
#define DEF_MYSMSAPINS0UserDeleteResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeleteResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeleteResponse *_mYSMSAPINS0UserDeleteResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeleteResponse = (MYSMSAPINS0UserDeleteResponse *) [MYSMSAPINS0UserDeleteResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeleteResponse;
}

//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 MYSMSAPINS0UserDeleteResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeleteResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeleteResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeleteResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeleteResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeleteResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeleteResponse *_mYSMSAPINS0UserDeleteResponse = [[MYSMSAPINS0UserDeleteResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeleteResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeleteResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeleteResponse autorelease];
  return _mYSMSAPINS0UserDeleteResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeleteResponse 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 MYSMSAPINS0UserDeleteResponse 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 MYSMSAPINS0UserDeleteResponse from an XML reader. The element to be read is
 * "userDeleteResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeleteResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeleteResponse *_userDeleteResponse = 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 userDeleteResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeleteResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeleteResponse.");
#endif
    _userDeleteResponse = (MYSMSAPINS0UserDeleteResponse *)[MYSMSAPINS0UserDeleteResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeleteResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeleteResponse. Expected element userDeleteResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeleteResponse. Expected element userDeleteResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeleteResponse;
}

/**
 * Writes this MYSMSAPINS0UserDeleteResponse to XML under element name "userDeleteResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeleteResponse The UserDeleteResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeleteResponse 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 "userDeleteResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeleteResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeleteResponse for root element {}userDeleteResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeleteResponse for root element {}userDeleteResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeleteResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserDeleteResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeleteResponse_M */
#ifndef DEF_MYSMSAPINS0UserGetBalanceResponse_M
#define DEF_MYSMSAPINS0UserGetBalanceResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetBalanceResponse

/**
 * The actual credits
 */
- (double) credit
{
  return _credit;
}

/**
 * The actual credits
 */
- (void) setCredit: (double) newCredit
{
  _credit = newCredit;
}

/**
 * The free sms count
 */
- (int) freeSms
{
  return _freeSms;
}

/**
 * The free sms count
 */
- (void) setFreeSms: (int) newFreeSms
{
  _freeSms = newFreeSms;
}

/**
 * The subscription sms count
 */
- (int) subscriptionSms
{
  return _subscriptionSms;
}

/**
 * The subscription sms count
 */
- (void) setSubscriptionSms: (int) newSubscriptionSms
{
  _subscriptionSms = newSubscriptionSms;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetBalanceResponse *_mYSMSAPINS0UserGetBalanceResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetBalanceResponse = (MYSMSAPINS0UserGetBalanceResponse *) [MYSMSAPINS0UserGetBalanceResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetBalanceResponse;
}

//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 MYSMSAPINS0UserGetBalanceResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetBalanceResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetBalanceResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetBalanceResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetBalanceResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetBalanceResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetBalanceResponse *_mYSMSAPINS0UserGetBalanceResponse = [[MYSMSAPINS0UserGetBalanceResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetBalanceResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetBalanceResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetBalanceResponse autorelease];
  return _mYSMSAPINS0UserGetBalanceResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetBalanceResponse 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 MYSMSAPINS0UserGetBalanceResponse 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 MYSMSAPINS0UserGetBalanceResponse from an XML reader. The element to be read is
 * "userGetBalanceResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetBalanceResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetBalanceResponse *_userGetBalanceResponse = 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 userGetBalanceResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetBalanceResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetBalanceResponse.");
#endif
    _userGetBalanceResponse = (MYSMSAPINS0UserGetBalanceResponse *)[MYSMSAPINS0UserGetBalanceResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetBalanceResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetBalanceResponse. Expected element userGetBalanceResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetBalanceResponse. Expected element userGetBalanceResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetBalanceResponse;
}

/**
 * Writes this MYSMSAPINS0UserGetBalanceResponse to XML under element name "userGetBalanceResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetBalanceResponse The UserGetBalanceResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetBalanceResponse 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 "userGetBalanceResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetBalanceResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetBalanceResponse for root element {}userGetBalanceResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetBalanceResponse for root element {}userGetBalanceResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetBalanceResponse. 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 "credit", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadDoubleType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setCredit: *((double*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "freeSms", 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 setFreeSms: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "subscriptionSms", 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 setSubscriptionSms: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "credit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}credit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}credit...");
#endif
    status = xmlTextWriterWriteDoubleType(writer, &_credit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}credit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}credit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}credit."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "freeSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}freeSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}freeSms...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_freeSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}freeSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}freeSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}freeSms."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subscriptionSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}subscriptionSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}subscriptionSms...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_subscriptionSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}subscriptionSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}subscriptionSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subscriptionSms."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserGetBalanceResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetBalanceResponse_M */
#ifndef DEF_MYSMSAPINS0UserGetFeatureResponse_M
#define DEF_MYSMSAPINS0UserGetFeatureResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetFeatureResponse

/**
 * Tells if remote sms is possible or not
 */
- (BOOL) remoteSmsEnabled
{
  return _remoteSmsEnabled;
}

/**
 * Tells if remote sms is possible or not
 */
- (void) setRemoteSmsEnabled: (BOOL) newRemoteSmsEnabled
{
  _remoteSmsEnabled = newRemoteSmsEnabled;
}

/**
 * Gives a regular expression that matches msisdn's to which sms can be send over mysms
 */
- (NSString *) smsEnabledRegex
{
  return _smsEnabledRegex;
}

/**
 * Gives a regular expression that matches msisdn's to which sms can be send over mysms
 */
- (void) setSmsEnabledRegex: (NSString *) newSmsEnabledRegex
{
  [newSmsEnabledRegex retain];
  [_smsEnabledRegex release];
  _smsEnabledRegex = newSmsEnabledRegex;
}

/**
 * Tells if receive calls is possible or not
 */
- (BOOL) receiveCallEnabled
{
  return _receiveCallEnabled;
}

/**
 * Tells if receive calls is possible or not
 */
- (void) setReceiveCallEnabled: (BOOL) newReceiveCallEnabled
{
  _receiveCallEnabled = newReceiveCallEnabled;
}

/**
 * Tells if remote call is possible or not
 */
- (BOOL) remoteCallEnabled
{
  return _remoteCallEnabled;
}

/**
 * Tells if remote call is possible or not
 */
- (void) setRemoteCallEnabled: (BOOL) newRemoteCallEnabled
{
  _remoteCallEnabled = newRemoteCallEnabled;
}

/**
 * Tells if a device is active or not
 */
- (BOOL) deviceActive
{
  return _deviceActive;
}

/**
 * Tells if a device is active or not
 */
- (void) setDeviceActive: (BOOL) newDeviceActive
{
  _deviceActive = newDeviceActive;
}

/**
 * Tells if the messages of a device is unreliable (no event for new messages)
 */
- (BOOL) deviceSyncUnreliable
{
  return _deviceSyncUnreliable;
}

/**
 * Tells if the messages of a device is unreliable (no event for new messages)
 */
- (void) setDeviceSyncUnreliable: (BOOL) newDeviceSyncUnreliable
{
  _deviceSyncUnreliable = newDeviceSyncUnreliable;
}

/**
 * Gives the max mms size in bytes.
 * 
 * A value of zero means mms is disabled for attachments,
 * but still allowed for group messaging.
 */
- (int) maxMmsSize
{
  return _maxMmsSize;
}

/**
 * Gives the max mms size in bytes.
 * 
 * A value of zero means mms is disabled for attachments,
 * but still allowed for group messaging.
 */
- (void) setMaxMmsSize: (int) newMaxMmsSize
{
  _maxMmsSize = newMaxMmsSize;
}

- (void) dealloc
{
  [self setSmsEnabledRegex: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetFeatureResponse *_mYSMSAPINS0UserGetFeatureResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetFeatureResponse = (MYSMSAPINS0UserGetFeatureResponse *) [MYSMSAPINS0UserGetFeatureResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetFeatureResponse;
}

//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 MYSMSAPINS0UserGetFeatureResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetFeatureResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetFeatureResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetFeatureResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetFeatureResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetFeatureResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetFeatureResponse *_mYSMSAPINS0UserGetFeatureResponse = [[MYSMSAPINS0UserGetFeatureResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetFeatureResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetFeatureResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetFeatureResponse autorelease];
  return _mYSMSAPINS0UserGetFeatureResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetFeatureResponse 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 MYSMSAPINS0UserGetFeatureResponse 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 MYSMSAPINS0UserGetFeatureResponse from an XML reader. The element to be read is
 * "userGetFeatureResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetFeatureResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetFeatureResponse *_userGetFeatureResponse = 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 userGetFeatureResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetFeatureResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetFeatureResponse.");
#endif
    _userGetFeatureResponse = (MYSMSAPINS0UserGetFeatureResponse *)[MYSMSAPINS0UserGetFeatureResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetFeatureResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetFeatureResponse. Expected element userGetFeatureResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetFeatureResponse. Expected element userGetFeatureResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetFeatureResponse;
}

/**
 * Writes this MYSMSAPINS0UserGetFeatureResponse to XML under element name "userGetFeatureResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetFeatureResponse The UserGetFeatureResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetFeatureResponse 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 "userGetFeatureResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetFeatureResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetFeatureResponse for root element {}userGetFeatureResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetFeatureResponse for root element {}userGetFeatureResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetFeatureResponse. 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 "remoteSmsEnabled", 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 setRemoteSmsEnabled: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsEnabledRegex", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}smsEnabledRegex of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}smsEnabledRegex of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSmsEnabledRegex: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "receiveCallEnabled", 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 setReceiveCallEnabled: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "remoteCallEnabled", 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 setRemoteCallEnabled: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceActive", 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 setDeviceActive: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceSyncUnreliable", 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 setDeviceSyncUnreliable: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "maxMmsSize", 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 setMaxMmsSize: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "remoteSmsEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}remoteSmsEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}remoteSmsEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_remoteSmsEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}remoteSmsEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}remoteSmsEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}remoteSmsEnabled."];
    }
  }
  if ([self smsEnabledRegex]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsEnabledRegex", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsEnabledRegex."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsEnabledRegex...");
#endif
    [[self smsEnabledRegex] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsEnabledRegex...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsEnabledRegex."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "receiveCallEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}receiveCallEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}receiveCallEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_receiveCallEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}receiveCallEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}receiveCallEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}receiveCallEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "remoteCallEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}remoteCallEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}remoteCallEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_remoteCallEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}remoteCallEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}remoteCallEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}remoteCallEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceActive", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceActive."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceActive...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_deviceActive);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceActive...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceActive."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceActive."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceSyncUnreliable", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceSyncUnreliable."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceSyncUnreliable...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_deviceSyncUnreliable);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceSyncUnreliable...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceSyncUnreliable."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceSyncUnreliable."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxMmsSize", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxMmsSize."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}maxMmsSize...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_maxMmsSize);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}maxMmsSize...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}maxMmsSize."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxMmsSize."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserGetFeatureResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetFeatureResponse_M */
#ifndef DEF_MYSMSAPINS0UserGetSettingResponse_M
#define DEF_MYSMSAPINS0UserGetSettingResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetSettingResponse

/**
 * The actual sms routing.
 * 
 * 0: send all sms over sim
 * 1: send all sms over mysms
 * 2: send national sms over sim and international over mysms
 */
- (int) smsRouting
{
  return _smsRouting;
}

/**
 * The actual sms routing.
 * 
 * 0: send all sms over sim
 * 1: send all sms over mysms
 * 2: send national sms over sim and international over mysms
 */
- (void) setSmsRouting: (int) newSmsRouting
{
  _smsRouting = newSmsRouting;
}

/**
 * The actual signature
 */
- (NSString *) signature
{
  return _signature;
}

/**
 * The actual signature
 */
- (void) setSignature: (NSString *) newSignature
{
  [newSignature retain];
  [_signature release];
  _signature = newSignature;
}

/**
 * The account to account send enabled state
 */
- (BOOL) a2aSendEnabled
{
  return _a2aSendEnabled;
}

/**
 * The account to account send enabled state
 */
- (void) setA2aSendEnabled: (BOOL) newA2aSendEnabled
{
  _a2aSendEnabled = newA2aSendEnabled;
}

/**
 * The account to account receive enabled state
 */
- (BOOL) a2aReceiveEnabled
{
  return _a2aReceiveEnabled;
}

/**
 * The account to account receive enabled state
 */
- (void) setA2aReceiveEnabled: (BOOL) newA2aReceiveEnabled
{
  _a2aReceiveEnabled = newA2aReceiveEnabled;
}

- (void) dealloc
{
  [self setSignature: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetSettingResponse *_mYSMSAPINS0UserGetSettingResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetSettingResponse = (MYSMSAPINS0UserGetSettingResponse *) [MYSMSAPINS0UserGetSettingResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetSettingResponse;
}

//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 MYSMSAPINS0UserGetSettingResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetSettingResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetSettingResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetSettingResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetSettingResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetSettingResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetSettingResponse *_mYSMSAPINS0UserGetSettingResponse = [[MYSMSAPINS0UserGetSettingResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetSettingResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetSettingResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetSettingResponse autorelease];
  return _mYSMSAPINS0UserGetSettingResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetSettingResponse 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 MYSMSAPINS0UserGetSettingResponse 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 MYSMSAPINS0UserGetSettingResponse from an XML reader. The element to be read is
 * "userGetSettingResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetSettingResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetSettingResponse *_userGetSettingResponse = 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 userGetSettingResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetSettingResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetSettingResponse.");
#endif
    _userGetSettingResponse = (MYSMSAPINS0UserGetSettingResponse *)[MYSMSAPINS0UserGetSettingResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetSettingResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSettingResponse. Expected element userGetSettingResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSettingResponse. Expected element userGetSettingResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetSettingResponse;
}

/**
 * Writes this MYSMSAPINS0UserGetSettingResponse to XML under element name "userGetSettingResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetSettingResponse The UserGetSettingResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetSettingResponse 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 "userGetSettingResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetSettingResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetSettingResponse for root element {}userGetSettingResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetSettingResponse for root element {}userGetSettingResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetSettingResponse. 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 "smsRouting", 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 setSmsRouting: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "signature", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}signature of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}signature of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSignature: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "a2aSendEnabled", 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 setA2aSendEnabled: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "a2aReceiveEnabled", 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 setA2aReceiveEnabled: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsRouting", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsRouting."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsRouting...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsRouting);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsRouting...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsRouting."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsRouting."];
    }
  }
  if ([self signature]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "signature", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}signature."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}signature...");
#endif
    [[self signature] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}signature...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}signature."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "a2aSendEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}a2aSendEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}a2aSendEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_a2aSendEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}a2aSendEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}a2aSendEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}a2aSendEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "a2aReceiveEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}a2aReceiveEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}a2aReceiveEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_a2aReceiveEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}a2aReceiveEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}a2aReceiveEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}a2aReceiveEnabled."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserGetSettingResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetSettingResponse_M */
#ifndef DEF_MYSMSAPINS0UserLoginRequest_M
#define DEF_MYSMSAPINS0UserLoginRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserLoginRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The user's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The user's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

/**
 * The optional key (max. 64 chars) for login check. If set and checkKey is true the key must match the last used key.
 */
- (NSString *) key
{
  return _key;
}

/**
 * The optional key (max. 64 chars) for login check. If set and checkKey is true the key must match the last used key.
 */
- (void) setKey: (NSString *) newKey
{
  [newKey retain];
  [_key release];
  _key = newKey;
}

/**
 * If true the provided key will be checked otherwise the provided key will overwrite the old one after successful login.
 */
- (BOOL) checkKey
{
  return _checkKey;
}

/**
 * If true the provided key will be checked otherwise the provided key will overwrite the old one after successful login.
 */
- (void) setCheckKey: (BOOL) newCheckKey
{
  _checkKey = newCheckKey;
}

- (void) dealloc
{
  [self setPassword: nil];
  [self setKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserLoginRequest *_mYSMSAPINS0UserLoginRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserLoginRequest = (MYSMSAPINS0UserLoginRequest *) [MYSMSAPINS0UserLoginRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserLoginRequest;
}

//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 MYSMSAPINS0UserLoginRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserLoginRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserLoginRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserLoginRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserLoginRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserLoginRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserLoginRequest *_mYSMSAPINS0UserLoginRequest = [[MYSMSAPINS0UserLoginRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserLoginRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserLoginRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserLoginRequest autorelease];
  return _mYSMSAPINS0UserLoginRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserLoginRequest 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 MYSMSAPINS0UserLoginRequest 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 MYSMSAPINS0UserLoginRequest from an XML reader. The element to be read is
 * "userLoginRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserLoginRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserLoginRequest *_userLoginRequest = 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 userLoginRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userLoginRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userLoginRequest.");
#endif
    _userLoginRequest = (MYSMSAPINS0UserLoginRequest *)[MYSMSAPINS0UserLoginRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userLoginRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserLoginRequest. Expected element userLoginRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserLoginRequest. Expected element userLoginRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userLoginRequest;
}

/**
 * Writes this MYSMSAPINS0UserLoginRequest to XML under element name "userLoginRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userLoginRequest The UserLoginRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserLoginRequest 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 "userLoginRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userLoginRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userLoginRequest for root element {}userLoginRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userLoginRequest for root element {}userLoginRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userLoginRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "key", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setKey: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "checkKey", 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 setCheckKey: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
  if ([self key]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "key", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}key."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}key...");
#endif
    [[self key] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}key...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}key."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "checkKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}checkKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}checkKey...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_checkKey);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}checkKey...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}checkKey."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}checkKey."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserLoginRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserLoginRequest_M */
#ifndef DEF_MYSMSAPINS0UserResetPasswordRequest_M
#define DEF_MYSMSAPINS0UserResetPasswordRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserResetPasswordRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * If set the new password is send as flash sms
 */
- (BOOL) flashSms
{
  return _flashSms;
}

/**
 * If set the new password is send as flash sms
 */
- (void) setFlashSms: (BOOL) newFlashSms
{
  _flashSms = newFlashSms;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserResetPasswordRequest *_mYSMSAPINS0UserResetPasswordRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserResetPasswordRequest = (MYSMSAPINS0UserResetPasswordRequest *) [MYSMSAPINS0UserResetPasswordRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserResetPasswordRequest;
}

//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 MYSMSAPINS0UserResetPasswordRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserResetPasswordRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserResetPasswordRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserResetPasswordRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserResetPasswordRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserResetPasswordRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserResetPasswordRequest *_mYSMSAPINS0UserResetPasswordRequest = [[MYSMSAPINS0UserResetPasswordRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserResetPasswordRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserResetPasswordRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserResetPasswordRequest autorelease];
  return _mYSMSAPINS0UserResetPasswordRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserResetPasswordRequest 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 MYSMSAPINS0UserResetPasswordRequest 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 MYSMSAPINS0UserResetPasswordRequest from an XML reader. The element to be read is
 * "userResetPasswordRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserResetPasswordRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserResetPasswordRequest *_userResetPasswordRequest = 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 userResetPasswordRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userResetPasswordRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userResetPasswordRequest.");
#endif
    _userResetPasswordRequest = (MYSMSAPINS0UserResetPasswordRequest *)[MYSMSAPINS0UserResetPasswordRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userResetPasswordRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserResetPasswordRequest. Expected element userResetPasswordRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserResetPasswordRequest. Expected element userResetPasswordRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userResetPasswordRequest;
}

/**
 * Writes this MYSMSAPINS0UserResetPasswordRequest to XML under element name "userResetPasswordRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userResetPasswordRequest The UserResetPasswordRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserResetPasswordRequest 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 "userResetPasswordRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userResetPasswordRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userResetPasswordRequest for root element {}userResetPasswordRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userResetPasswordRequest for root element {}userResetPasswordRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userResetPasswordRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "flashSms", 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 setFlashSms: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "flashSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}flashSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}flashSms...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_flashSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}flashSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}flashSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}flashSms."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserResetPasswordRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserResetPasswordRequest_M */
#ifndef DEF_MYSMSAPINS0UserResetPasswordResponse_M
#define DEF_MYSMSAPINS0UserResetPasswordResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserResetPasswordResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserResetPasswordResponse *_mYSMSAPINS0UserResetPasswordResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserResetPasswordResponse = (MYSMSAPINS0UserResetPasswordResponse *) [MYSMSAPINS0UserResetPasswordResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserResetPasswordResponse;
}

//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 MYSMSAPINS0UserResetPasswordResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserResetPasswordResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserResetPasswordResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserResetPasswordResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserResetPasswordResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserResetPasswordResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserResetPasswordResponse *_mYSMSAPINS0UserResetPasswordResponse = [[MYSMSAPINS0UserResetPasswordResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserResetPasswordResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserResetPasswordResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserResetPasswordResponse autorelease];
  return _mYSMSAPINS0UserResetPasswordResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserResetPasswordResponse 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 MYSMSAPINS0UserResetPasswordResponse 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 MYSMSAPINS0UserResetPasswordResponse from an XML reader. The element to be read is
 * "userResetPasswordResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserResetPasswordResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserResetPasswordResponse *_userResetPasswordResponse = 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 userResetPasswordResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userResetPasswordResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userResetPasswordResponse.");
#endif
    _userResetPasswordResponse = (MYSMSAPINS0UserResetPasswordResponse *)[MYSMSAPINS0UserResetPasswordResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userResetPasswordResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserResetPasswordResponse. Expected element userResetPasswordResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserResetPasswordResponse. Expected element userResetPasswordResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userResetPasswordResponse;
}

/**
 * Writes this MYSMSAPINS0UserResetPasswordResponse to XML under element name "userResetPasswordResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userResetPasswordResponse The UserResetPasswordResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserResetPasswordResponse 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 "userResetPasswordResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userResetPasswordResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userResetPasswordResponse for root element {}userResetPasswordResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userResetPasswordResponse for root element {}userResetPasswordResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userResetPasswordResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserResetPasswordResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserResetPasswordResponse_M */
#ifndef DEF_MYSMSAPINS0UserSetSettingResponse_M
#define DEF_MYSMSAPINS0UserSetSettingResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSetSettingResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSetSettingResponse *_mYSMSAPINS0UserSetSettingResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSetSettingResponse = (MYSMSAPINS0UserSetSettingResponse *) [MYSMSAPINS0UserSetSettingResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSetSettingResponse;
}

//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 MYSMSAPINS0UserSetSettingResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSetSettingResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSetSettingResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSetSettingResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSetSettingResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSetSettingResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSetSettingResponse *_mYSMSAPINS0UserSetSettingResponse = [[MYSMSAPINS0UserSetSettingResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSetSettingResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSetSettingResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSetSettingResponse autorelease];
  return _mYSMSAPINS0UserSetSettingResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSetSettingResponse 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 MYSMSAPINS0UserSetSettingResponse 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 MYSMSAPINS0UserSetSettingResponse from an XML reader. The element to be read is
 * "userSetSettingResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSetSettingResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSetSettingResponse *_userSetSettingResponse = 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 userSetSettingResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSetSettingResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSetSettingResponse.");
#endif
    _userSetSettingResponse = (MYSMSAPINS0UserSetSettingResponse *)[MYSMSAPINS0UserSetSettingResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSetSettingResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSettingResponse. Expected element userSetSettingResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSettingResponse. Expected element userSetSettingResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSetSettingResponse;
}

/**
 * Writes this MYSMSAPINS0UserSetSettingResponse to XML under element name "userSetSettingResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSetSettingResponse The UserSetSettingResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSetSettingResponse 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 "userSetSettingResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSetSettingResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSetSettingResponse for root element {}userSetSettingResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSetSettingResponse for root element {}userSetSettingResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSetSettingResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSetSettingResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSetSettingResponse_M */
#ifndef DEF_MYSMSAPINS0UserSetSmsRoutingResponse_M
#define DEF_MYSMSAPINS0UserSetSmsRoutingResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSetSmsRoutingResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSetSmsRoutingResponse *_mYSMSAPINS0UserSetSmsRoutingResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSetSmsRoutingResponse = (MYSMSAPINS0UserSetSmsRoutingResponse *) [MYSMSAPINS0UserSetSmsRoutingResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSetSmsRoutingResponse;
}

//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 MYSMSAPINS0UserSetSmsRoutingResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSetSmsRoutingResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSetSmsRoutingResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSetSmsRoutingResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSetSmsRoutingResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSetSmsRoutingResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSetSmsRoutingResponse *_mYSMSAPINS0UserSetSmsRoutingResponse = [[MYSMSAPINS0UserSetSmsRoutingResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSetSmsRoutingResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSetSmsRoutingResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSetSmsRoutingResponse autorelease];
  return _mYSMSAPINS0UserSetSmsRoutingResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSetSmsRoutingResponse 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 MYSMSAPINS0UserSetSmsRoutingResponse 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 MYSMSAPINS0UserSetSmsRoutingResponse from an XML reader. The element to be read is
 * "userSetSmsRoutingResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSetSmsRoutingResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSetSmsRoutingResponse *_userSetSmsRoutingResponse = 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 userSetSmsRoutingResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSetSmsRoutingResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSetSmsRoutingResponse.");
#endif
    _userSetSmsRoutingResponse = (MYSMSAPINS0UserSetSmsRoutingResponse *)[MYSMSAPINS0UserSetSmsRoutingResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSetSmsRoutingResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSmsRoutingResponse. Expected element userSetSmsRoutingResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSmsRoutingResponse. Expected element userSetSmsRoutingResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSetSmsRoutingResponse;
}

/**
 * Writes this MYSMSAPINS0UserSetSmsRoutingResponse to XML under element name "userSetSmsRoutingResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSetSmsRoutingResponse The UserSetSmsRoutingResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSetSmsRoutingResponse 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 "userSetSmsRoutingResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSetSmsRoutingResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSetSmsRoutingResponse for root element {}userSetSmsRoutingResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSetSmsRoutingResponse for root element {}userSetSmsRoutingResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSetSmsRoutingResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSetSmsRoutingResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSetSmsRoutingResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallCountUnreadResponse_M
#define DEF_MYSMSAPINS0UserCallCountUnreadResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallCountUnreadResponse

/**
 * The amount of unread calls
 */
- (int) unreadCount
{
  return _unreadCount;
}

/**
 * The amount of unread calls
 */
- (void) setUnreadCount: (int) newUnreadCount
{
  _unreadCount = newUnreadCount;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallCountUnreadResponse *_mYSMSAPINS0UserCallCountUnreadResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallCountUnreadResponse = (MYSMSAPINS0UserCallCountUnreadResponse *) [MYSMSAPINS0UserCallCountUnreadResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallCountUnreadResponse;
}

//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 MYSMSAPINS0UserCallCountUnreadResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallCountUnreadResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallCountUnreadResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallCountUnreadResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallCountUnreadResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallCountUnreadResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallCountUnreadResponse *_mYSMSAPINS0UserCallCountUnreadResponse = [[MYSMSAPINS0UserCallCountUnreadResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallCountUnreadResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallCountUnreadResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallCountUnreadResponse autorelease];
  return _mYSMSAPINS0UserCallCountUnreadResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallCountUnreadResponse 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 MYSMSAPINS0UserCallCountUnreadResponse 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 MYSMSAPINS0UserCallCountUnreadResponse from an XML reader. The element to be read is
 * "userCallCountUnreadResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallCountUnreadResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallCountUnreadResponse *_userCallCountUnreadResponse = 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 userCallCountUnreadResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallCountUnreadResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallCountUnreadResponse.");
#endif
    _userCallCountUnreadResponse = (MYSMSAPINS0UserCallCountUnreadResponse *)[MYSMSAPINS0UserCallCountUnreadResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallCountUnreadResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallCountUnreadResponse. Expected element userCallCountUnreadResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallCountUnreadResponse. Expected element userCallCountUnreadResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallCountUnreadResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallCountUnreadResponse to XML under element name "userCallCountUnreadResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallCountUnreadResponse The UserCallCountUnreadResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallCountUnreadResponse 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 "userCallCountUnreadResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallCountUnreadResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallCountUnreadResponse for root element {}userCallCountUnreadResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallCountUnreadResponse for root element {}userCallCountUnreadResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallCountUnreadResponse. 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 "unreadCount", 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 setUnreadCount: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "unreadCount", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}unreadCount."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}unreadCount...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_unreadCount);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}unreadCount...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}unreadCount."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}unreadCount."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallCountUnreadResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallCountUnreadResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallDeleteAllResponse_M
#define DEF_MYSMSAPINS0UserCallDeleteAllResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallDeleteAllResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallDeleteAllResponse *_mYSMSAPINS0UserCallDeleteAllResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallDeleteAllResponse = (MYSMSAPINS0UserCallDeleteAllResponse *) [MYSMSAPINS0UserCallDeleteAllResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallDeleteAllResponse;
}

//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 MYSMSAPINS0UserCallDeleteAllResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallDeleteAllResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallDeleteAllResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallDeleteAllResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallDeleteAllResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallDeleteAllResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallDeleteAllResponse *_mYSMSAPINS0UserCallDeleteAllResponse = [[MYSMSAPINS0UserCallDeleteAllResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallDeleteAllResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallDeleteAllResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallDeleteAllResponse autorelease];
  return _mYSMSAPINS0UserCallDeleteAllResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallDeleteAllResponse 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 MYSMSAPINS0UserCallDeleteAllResponse 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 MYSMSAPINS0UserCallDeleteAllResponse from an XML reader. The element to be read is
 * "userCallDeleteAllResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallDeleteAllResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallDeleteAllResponse *_userCallDeleteAllResponse = 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 userCallDeleteAllResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallDeleteAllResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallDeleteAllResponse.");
#endif
    _userCallDeleteAllResponse = (MYSMSAPINS0UserCallDeleteAllResponse *)[MYSMSAPINS0UserCallDeleteAllResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallDeleteAllResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteAllResponse. Expected element userCallDeleteAllResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteAllResponse. Expected element userCallDeleteAllResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallDeleteAllResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteAllResponse to XML under element name "userCallDeleteAllResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallDeleteAllResponse The UserCallDeleteAllResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteAllResponse 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 "userCallDeleteAllResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallDeleteAllResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallDeleteAllResponse for root element {}userCallDeleteAllResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallDeleteAllResponse for root element {}userCallDeleteAllResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallDeleteAllResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallDeleteAllResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallDeleteAllResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallDeleteListResponse_M
#define DEF_MYSMSAPINS0UserCallDeleteListResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallDeleteListResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallDeleteListResponse *_mYSMSAPINS0UserCallDeleteListResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallDeleteListResponse = (MYSMSAPINS0UserCallDeleteListResponse *) [MYSMSAPINS0UserCallDeleteListResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallDeleteListResponse;
}

//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 MYSMSAPINS0UserCallDeleteListResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallDeleteListResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallDeleteListResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallDeleteListResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallDeleteListResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallDeleteListResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallDeleteListResponse *_mYSMSAPINS0UserCallDeleteListResponse = [[MYSMSAPINS0UserCallDeleteListResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallDeleteListResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallDeleteListResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallDeleteListResponse autorelease];
  return _mYSMSAPINS0UserCallDeleteListResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallDeleteListResponse 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 MYSMSAPINS0UserCallDeleteListResponse 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 MYSMSAPINS0UserCallDeleteListResponse from an XML reader. The element to be read is
 * "userCallDeleteListResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallDeleteListResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallDeleteListResponse *_userCallDeleteListResponse = 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 userCallDeleteListResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallDeleteListResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallDeleteListResponse.");
#endif
    _userCallDeleteListResponse = (MYSMSAPINS0UserCallDeleteListResponse *)[MYSMSAPINS0UserCallDeleteListResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallDeleteListResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteListResponse. Expected element userCallDeleteListResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteListResponse. Expected element userCallDeleteListResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallDeleteListResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteListResponse to XML under element name "userCallDeleteListResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallDeleteListResponse The UserCallDeleteListResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteListResponse 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 "userCallDeleteListResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallDeleteListResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallDeleteListResponse for root element {}userCallDeleteListResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallDeleteListResponse for root element {}userCallDeleteListResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallDeleteListResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallDeleteListResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallDeleteListResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallGetCallsResponse_M
#define DEF_MYSMSAPINS0UserCallGetCallsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallGetCallsResponse

/**
 * The list of user calls
 */
- (NSArray *) calls
{
  return _calls;
}

/**
 * The list of user calls
 */
- (void) setCalls: (NSArray *) newCalls
{
  [newCalls retain];
  [_calls release];
  _calls = newCalls;
}

- (void) dealloc
{
  [self setCalls: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallGetCallsResponse *_mYSMSAPINS0UserCallGetCallsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallGetCallsResponse = (MYSMSAPINS0UserCallGetCallsResponse *) [MYSMSAPINS0UserCallGetCallsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallGetCallsResponse;
}

//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 MYSMSAPINS0UserCallGetCallsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallGetCallsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallGetCallsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallGetCallsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallGetCallsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallGetCallsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallGetCallsResponse *_mYSMSAPINS0UserCallGetCallsResponse = [[MYSMSAPINS0UserCallGetCallsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallGetCallsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallGetCallsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallGetCallsResponse autorelease];
  return _mYSMSAPINS0UserCallGetCallsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallGetCallsResponse 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 MYSMSAPINS0UserCallGetCallsResponse 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 MYSMSAPINS0UserCallGetCallsResponse from an XML reader. The element to be read is
 * "userCallGetCallsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallGetCallsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallGetCallsResponse *_userCallGetCallsResponse = 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 userCallGetCallsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallGetCallsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallGetCallsResponse.");
#endif
    _userCallGetCallsResponse = (MYSMSAPINS0UserCallGetCallsResponse *)[MYSMSAPINS0UserCallGetCallsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallGetCallsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallGetCallsResponse. Expected element userCallGetCallsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallGetCallsResponse. Expected element userCallGetCallsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallGetCallsResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallGetCallsResponse to XML under element name "userCallGetCallsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallGetCallsResponse The UserCallGetCallsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallGetCallsResponse 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 "userCallGetCallsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallGetCallsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallGetCallsResponse for root element {}userCallGetCallsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallGetCallsResponse for root element {}userCallGetCallsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallGetCallsResponse. 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 "calls", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}calls of type {}userCall.");
#endif

     __child = [MYSMSAPINS0UserCall readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}calls of type {}userCall.");
#endif

    if ([self calls]) {
      [self setCalls: [[self calls] arrayByAddingObject: __child]];
    }
    else {
      [self setCalls: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self calls]) {
    __enumerator = [[self calls] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "calls", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}calls."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}calls...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}calls...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}calls."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserCallGetCallsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallGetCallsResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallInsertResponse_M
#define DEF_MYSMSAPINS0UserCallInsertResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallInsertResponse

/**
 * The call id of the call
 */
- (int) callId
{
  return _callId;
}

/**
 * The call id of the call
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallInsertResponse *_mYSMSAPINS0UserCallInsertResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallInsertResponse = (MYSMSAPINS0UserCallInsertResponse *) [MYSMSAPINS0UserCallInsertResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallInsertResponse;
}

//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 MYSMSAPINS0UserCallInsertResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallInsertResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallInsertResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallInsertResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallInsertResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallInsertResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallInsertResponse *_mYSMSAPINS0UserCallInsertResponse = [[MYSMSAPINS0UserCallInsertResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallInsertResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallInsertResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallInsertResponse autorelease];
  return _mYSMSAPINS0UserCallInsertResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallInsertResponse 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 MYSMSAPINS0UserCallInsertResponse 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 MYSMSAPINS0UserCallInsertResponse from an XML reader. The element to be read is
 * "userCallInsertResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallInsertResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallInsertResponse *_userCallInsertResponse = 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 userCallInsertResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallInsertResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallInsertResponse.");
#endif
    _userCallInsertResponse = (MYSMSAPINS0UserCallInsertResponse *)[MYSMSAPINS0UserCallInsertResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallInsertResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallInsertResponse. Expected element userCallInsertResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallInsertResponse. Expected element userCallInsertResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallInsertResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallInsertResponse to XML under element name "userCallInsertResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallInsertResponse The UserCallInsertResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallInsertResponse 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 "userCallInsertResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallInsertResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallInsertResponse for root element {}userCallInsertResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallInsertResponse for root element {}userCallInsertResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallInsertResponse. 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 "callId", 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 setCallId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}callId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_callId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}callId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}callId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}callId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallInsertResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallInsertResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallSyncResponse_M
#define DEF_MYSMSAPINS0UserCallSyncResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallSyncResponse

/**
 * The calls that were modified on the server and needs to be synchronized to the device.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The calls that were modified on the server and needs to be synchronized to the device.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of calls synchronized previously from the device.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of calls synchronized previously from the device.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallSyncResponse *_mYSMSAPINS0UserCallSyncResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallSyncResponse = (MYSMSAPINS0UserCallSyncResponse *) [MYSMSAPINS0UserCallSyncResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallSyncResponse;
}

//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 MYSMSAPINS0UserCallSyncResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallSyncResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallSyncResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallSyncResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallSyncResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallSyncResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallSyncResponse *_mYSMSAPINS0UserCallSyncResponse = [[MYSMSAPINS0UserCallSyncResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallSyncResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallSyncResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallSyncResponse autorelease];
  return _mYSMSAPINS0UserCallSyncResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallSyncResponse 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 MYSMSAPINS0UserCallSyncResponse 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 MYSMSAPINS0UserCallSyncResponse from an XML reader. The element to be read is
 * "userCallSyncResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallSyncResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallSyncResponse *_userCallSyncResponse = 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 userCallSyncResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallSyncResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallSyncResponse.");
#endif
    _userCallSyncResponse = (MYSMSAPINS0UserCallSyncResponse *)[MYSMSAPINS0UserCallSyncResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallSyncResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallSyncResponse. Expected element userCallSyncResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallSyncResponse. Expected element userCallSyncResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallSyncResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallSyncResponse to XML under element name "userCallSyncResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallSyncResponse The UserCallSyncResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallSyncResponse 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 "userCallSyncResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallSyncResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallSyncResponse for root element {}userCallSyncResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallSyncResponse for root element {}userCallSyncResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallSyncResponse. 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 "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userCallSync.");
#endif

     __child = [MYSMSAPINS0UserCallSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userCallSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userCallSyncAck.");
#endif

     __child = [MYSMSAPINS0UserCallSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userCallSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserCallSyncResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallSyncResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallUpdateResponse_M
#define DEF_MYSMSAPINS0UserCallUpdateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallUpdateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallUpdateResponse *_mYSMSAPINS0UserCallUpdateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallUpdateResponse = (MYSMSAPINS0UserCallUpdateResponse *) [MYSMSAPINS0UserCallUpdateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallUpdateResponse;
}

//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 MYSMSAPINS0UserCallUpdateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallUpdateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallUpdateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallUpdateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallUpdateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallUpdateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallUpdateResponse *_mYSMSAPINS0UserCallUpdateResponse = [[MYSMSAPINS0UserCallUpdateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallUpdateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallUpdateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallUpdateResponse autorelease];
  return _mYSMSAPINS0UserCallUpdateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallUpdateResponse 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 MYSMSAPINS0UserCallUpdateResponse 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 MYSMSAPINS0UserCallUpdateResponse from an XML reader. The element to be read is
 * "userCallUpdateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallUpdateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallUpdateResponse *_userCallUpdateResponse = 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 userCallUpdateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallUpdateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallUpdateResponse.");
#endif
    _userCallUpdateResponse = (MYSMSAPINS0UserCallUpdateResponse *)[MYSMSAPINS0UserCallUpdateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallUpdateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallUpdateResponse. Expected element userCallUpdateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallUpdateResponse. Expected element userCallUpdateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallUpdateResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallUpdateResponse to XML under element name "userCallUpdateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallUpdateResponse The UserCallUpdateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallUpdateResponse 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 "userCallUpdateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallUpdateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallUpdateResponse for root element {}userCallUpdateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallUpdateResponse for root element {}userCallUpdateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallUpdateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallUpdateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallUpdateResponse_M */
#ifndef DEF_MYSMSAPINS0UserContactGetA2aMsisdnsResponse_M
#define DEF_MYSMSAPINS0UserContactGetA2aMsisdnsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactGetA2aMsisdnsResponse

/**
 * The list of user contacts msisdns that are available for a2a.
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The list of user contacts msisdns that are available for a2a.
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

- (void) dealloc
{
  [self setMsisdns: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactGetA2aMsisdnsResponse *_mYSMSAPINS0UserContactGetA2aMsisdnsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactGetA2aMsisdnsResponse = (MYSMSAPINS0UserContactGetA2aMsisdnsResponse *) [MYSMSAPINS0UserContactGetA2aMsisdnsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactGetA2aMsisdnsResponse;
}

//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 MYSMSAPINS0UserContactGetA2aMsisdnsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactGetA2aMsisdnsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactGetA2aMsisdnsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactGetA2aMsisdnsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactGetA2aMsisdnsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactGetA2aMsisdnsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactGetA2aMsisdnsResponse *_mYSMSAPINS0UserContactGetA2aMsisdnsResponse = [[MYSMSAPINS0UserContactGetA2aMsisdnsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactGetA2aMsisdnsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactGetA2aMsisdnsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactGetA2aMsisdnsResponse autorelease];
  return _mYSMSAPINS0UserContactGetA2aMsisdnsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactGetA2aMsisdnsResponse 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 MYSMSAPINS0UserContactGetA2aMsisdnsResponse 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 MYSMSAPINS0UserContactGetA2aMsisdnsResponse from an XML reader. The element to be read is
 * "userContactGetA2aMsisdnsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactGetA2aMsisdnsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactGetA2aMsisdnsResponse *_userContactGetA2aMsisdnsResponse = 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 userContactGetA2aMsisdnsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactGetA2aMsisdnsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactGetA2aMsisdnsResponse.");
#endif
    _userContactGetA2aMsisdnsResponse = (MYSMSAPINS0UserContactGetA2aMsisdnsResponse *)[MYSMSAPINS0UserContactGetA2aMsisdnsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactGetA2aMsisdnsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetA2aMsisdnsResponse. Expected element userContactGetA2aMsisdnsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetA2aMsisdnsResponse. Expected element userContactGetA2aMsisdnsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactGetA2aMsisdnsResponse;
}

/**
 * Writes this MYSMSAPINS0UserContactGetA2aMsisdnsResponse to XML under element name "userContactGetA2aMsisdnsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactGetA2aMsisdnsResponse The UserContactGetA2aMsisdnsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactGetA2aMsisdnsResponse 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 "userContactGetA2aMsisdnsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactGetA2aMsisdnsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactGetA2aMsisdnsResponse for root element {}userContactGetA2aMsisdnsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactGetA2aMsisdnsResponse for root element {}userContactGetA2aMsisdnsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactGetA2aMsisdnsResponse. 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 "msisdns", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

     __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    if ([self msisdns]) {
      [self setMsisdns: [[self msisdns] arrayByAddingObject: __child]];
    }
    else {
      [self setMsisdns: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdns", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}msisdns."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}msisdns...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}msisdns...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}msisdns."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserContactGetA2aMsisdnsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactGetA2aMsisdnsResponse_M */
#ifndef DEF_MYSMSAPINS0UserContactSyncResponse_M
#define DEF_MYSMSAPINS0UserContactSyncResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactSyncResponse

/**
 * The contacts that were modified on the server and needs to be synchronized to the device.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The contacts that were modified on the server and needs to be synchronized to the device.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of contacts synchronized previously from the device.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of contacts synchronized previously from the device.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactSyncResponse *_mYSMSAPINS0UserContactSyncResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactSyncResponse = (MYSMSAPINS0UserContactSyncResponse *) [MYSMSAPINS0UserContactSyncResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactSyncResponse;
}

//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 MYSMSAPINS0UserContactSyncResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactSyncResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactSyncResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactSyncResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactSyncResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactSyncResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactSyncResponse *_mYSMSAPINS0UserContactSyncResponse = [[MYSMSAPINS0UserContactSyncResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactSyncResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactSyncResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactSyncResponse autorelease];
  return _mYSMSAPINS0UserContactSyncResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactSyncResponse 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 MYSMSAPINS0UserContactSyncResponse 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 MYSMSAPINS0UserContactSyncResponse from an XML reader. The element to be read is
 * "userContactSyncResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactSyncResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactSyncResponse *_userContactSyncResponse = 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 userContactSyncResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactSyncResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactSyncResponse.");
#endif
    _userContactSyncResponse = (MYSMSAPINS0UserContactSyncResponse *)[MYSMSAPINS0UserContactSyncResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactSyncResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactSyncResponse. Expected element userContactSyncResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactSyncResponse. Expected element userContactSyncResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactSyncResponse;
}

/**
 * Writes this MYSMSAPINS0UserContactSyncResponse to XML under element name "userContactSyncResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactSyncResponse The UserContactSyncResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactSyncResponse 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 "userContactSyncResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactSyncResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactSyncResponse for root element {}userContactSyncResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactSyncResponse for root element {}userContactSyncResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactSyncResponse. 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 "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userContactSync.");
#endif

     __child = [MYSMSAPINS0UserContactSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userContactSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userContactSyncAck.");
#endif

     __child = [MYSMSAPINS0UserContactSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userContactSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserContactSyncResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactSyncResponse_M */
#ifndef DEF_MYSMSAPINS0UserDeviceClientDeleteResponse_M
#define DEF_MYSMSAPINS0UserDeviceClientDeleteResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceClientDeleteResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceClientDeleteResponse *_mYSMSAPINS0UserDeviceClientDeleteResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceClientDeleteResponse = (MYSMSAPINS0UserDeviceClientDeleteResponse *) [MYSMSAPINS0UserDeviceClientDeleteResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceClientDeleteResponse;
}

//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 MYSMSAPINS0UserDeviceClientDeleteResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceClientDeleteResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceClientDeleteResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceClientDeleteResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceClientDeleteResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceClientDeleteResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceClientDeleteResponse *_mYSMSAPINS0UserDeviceClientDeleteResponse = [[MYSMSAPINS0UserDeviceClientDeleteResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceClientDeleteResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceClientDeleteResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceClientDeleteResponse autorelease];
  return _mYSMSAPINS0UserDeviceClientDeleteResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceClientDeleteResponse 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 MYSMSAPINS0UserDeviceClientDeleteResponse 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 MYSMSAPINS0UserDeviceClientDeleteResponse from an XML reader. The element to be read is
 * "userDeviceClientDeleteResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceClientDeleteResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceClientDeleteResponse *_userDeviceClientDeleteResponse = 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 userDeviceClientDeleteResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceClientDeleteResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceClientDeleteResponse.");
#endif
    _userDeviceClientDeleteResponse = (MYSMSAPINS0UserDeviceClientDeleteResponse *)[MYSMSAPINS0UserDeviceClientDeleteResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceClientDeleteResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientDeleteResponse. Expected element userDeviceClientDeleteResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientDeleteResponse. Expected element userDeviceClientDeleteResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceClientDeleteResponse;
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientDeleteResponse to XML under element name "userDeviceClientDeleteResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceClientDeleteResponse The UserDeviceClientDeleteResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientDeleteResponse 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 "userDeviceClientDeleteResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceClientDeleteResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceClientDeleteResponse for root element {}userDeviceClientDeleteResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceClientDeleteResponse for root element {}userDeviceClientDeleteResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceClientDeleteResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserDeviceClientDeleteResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceClientDeleteResponse_M */
#ifndef DEF_MYSMSAPINS0UserDeviceClientGetResponse_M
#define DEF_MYSMSAPINS0UserDeviceClientGetResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceClientGetResponse

/**
 * The newly created client device id
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The newly created client device id
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceClientGetResponse *_mYSMSAPINS0UserDeviceClientGetResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceClientGetResponse = (MYSMSAPINS0UserDeviceClientGetResponse *) [MYSMSAPINS0UserDeviceClientGetResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceClientGetResponse;
}

//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 MYSMSAPINS0UserDeviceClientGetResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceClientGetResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceClientGetResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceClientGetResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceClientGetResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceClientGetResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceClientGetResponse *_mYSMSAPINS0UserDeviceClientGetResponse = [[MYSMSAPINS0UserDeviceClientGetResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceClientGetResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceClientGetResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceClientGetResponse autorelease];
  return _mYSMSAPINS0UserDeviceClientGetResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceClientGetResponse 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 MYSMSAPINS0UserDeviceClientGetResponse 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 MYSMSAPINS0UserDeviceClientGetResponse from an XML reader. The element to be read is
 * "userDeviceClientGetResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceClientGetResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceClientGetResponse *_userDeviceClientGetResponse = 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 userDeviceClientGetResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceClientGetResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceClientGetResponse.");
#endif
    _userDeviceClientGetResponse = (MYSMSAPINS0UserDeviceClientGetResponse *)[MYSMSAPINS0UserDeviceClientGetResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceClientGetResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientGetResponse. Expected element userDeviceClientGetResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientGetResponse. Expected element userDeviceClientGetResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceClientGetResponse;
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientGetResponse to XML under element name "userDeviceClientGetResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceClientGetResponse The UserDeviceClientGetResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientGetResponse 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 "userDeviceClientGetResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceClientGetResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceClientGetResponse for root element {}userDeviceClientGetResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceClientGetResponse for root element {}userDeviceClientGetResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceClientGetResponse. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceClientGetResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceClientGetResponse_M */
#ifndef DEF_MYSMSAPINS0UserDeviceCreateResponse_M
#define DEF_MYSMSAPINS0UserDeviceCreateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceCreateResponse

/**
 * The newly created device id
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The newly created device id
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceCreateResponse *_mYSMSAPINS0UserDeviceCreateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceCreateResponse = (MYSMSAPINS0UserDeviceCreateResponse *) [MYSMSAPINS0UserDeviceCreateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceCreateResponse;
}

//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 MYSMSAPINS0UserDeviceCreateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceCreateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceCreateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceCreateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceCreateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceCreateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceCreateResponse *_mYSMSAPINS0UserDeviceCreateResponse = [[MYSMSAPINS0UserDeviceCreateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceCreateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceCreateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceCreateResponse autorelease];
  return _mYSMSAPINS0UserDeviceCreateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceCreateResponse 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 MYSMSAPINS0UserDeviceCreateResponse 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 MYSMSAPINS0UserDeviceCreateResponse from an XML reader. The element to be read is
 * "userDeviceCreateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceCreateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceCreateResponse *_userDeviceCreateResponse = 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 userDeviceCreateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceCreateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceCreateResponse.");
#endif
    _userDeviceCreateResponse = (MYSMSAPINS0UserDeviceCreateResponse *)[MYSMSAPINS0UserDeviceCreateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceCreateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceCreateResponse. Expected element userDeviceCreateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceCreateResponse. Expected element userDeviceCreateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceCreateResponse;
}

/**
 * Writes this MYSMSAPINS0UserDeviceCreateResponse to XML under element name "userDeviceCreateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceCreateResponse The UserDeviceCreateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceCreateResponse 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 "userDeviceCreateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceCreateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceCreateResponse for root element {}userDeviceCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceCreateResponse for root element {}userDeviceCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceCreateResponse. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceCreateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceCreateResponse_M */
#ifndef DEF_MYSMSAPINS0UserDeviceUpdateResponse_M
#define DEF_MYSMSAPINS0UserDeviceUpdateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceUpdateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceUpdateResponse *_mYSMSAPINS0UserDeviceUpdateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceUpdateResponse = (MYSMSAPINS0UserDeviceUpdateResponse *) [MYSMSAPINS0UserDeviceUpdateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceUpdateResponse;
}

//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 MYSMSAPINS0UserDeviceUpdateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceUpdateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceUpdateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceUpdateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceUpdateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceUpdateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceUpdateResponse *_mYSMSAPINS0UserDeviceUpdateResponse = [[MYSMSAPINS0UserDeviceUpdateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceUpdateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceUpdateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceUpdateResponse autorelease];
  return _mYSMSAPINS0UserDeviceUpdateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceUpdateResponse 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 MYSMSAPINS0UserDeviceUpdateResponse 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 MYSMSAPINS0UserDeviceUpdateResponse from an XML reader. The element to be read is
 * "userDeviceUpdateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceUpdateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceUpdateResponse *_userDeviceUpdateResponse = 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 userDeviceUpdateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceUpdateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceUpdateResponse.");
#endif
    _userDeviceUpdateResponse = (MYSMSAPINS0UserDeviceUpdateResponse *)[MYSMSAPINS0UserDeviceUpdateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceUpdateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceUpdateResponse. Expected element userDeviceUpdateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceUpdateResponse. Expected element userDeviceUpdateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceUpdateResponse;
}

/**
 * Writes this MYSMSAPINS0UserDeviceUpdateResponse to XML under element name "userDeviceUpdateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceUpdateResponse The UserDeviceUpdateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceUpdateResponse 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 "userDeviceUpdateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceUpdateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceUpdateResponse for root element {}userDeviceUpdateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceUpdateResponse for root element {}userDeviceUpdateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceUpdateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserDeviceUpdateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceUpdateResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteConversationListResponse_M
#define DEF_MYSMSAPINS0UserMessageDeleteConversationListResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationListResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteConversationListResponse *_mYSMSAPINS0UserMessageDeleteConversationListResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteConversationListResponse = (MYSMSAPINS0UserMessageDeleteConversationListResponse *) [MYSMSAPINS0UserMessageDeleteConversationListResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteConversationListResponse;
}

//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 MYSMSAPINS0UserMessageDeleteConversationListResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteConversationListResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteConversationListResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationListResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteConversationListResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteConversationListResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteConversationListResponse *_mYSMSAPINS0UserMessageDeleteConversationListResponse = [[MYSMSAPINS0UserMessageDeleteConversationListResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteConversationListResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteConversationListResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteConversationListResponse autorelease];
  return _mYSMSAPINS0UserMessageDeleteConversationListResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteConversationListResponse 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 MYSMSAPINS0UserMessageDeleteConversationListResponse 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 MYSMSAPINS0UserMessageDeleteConversationListResponse from an XML reader. The element to be read is
 * "userMessageDeleteConversationListResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteConversationListResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteConversationListResponse *_userMessageDeleteConversationListResponse = 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 userMessageDeleteConversationListResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteConversationListResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteConversationListResponse.");
#endif
    _userMessageDeleteConversationListResponse = (MYSMSAPINS0UserMessageDeleteConversationListResponse *)[MYSMSAPINS0UserMessageDeleteConversationListResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteConversationListResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationListResponse. Expected element userMessageDeleteConversationListResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationListResponse. Expected element userMessageDeleteConversationListResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteConversationListResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationListResponse to XML under element name "userMessageDeleteConversationListResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteConversationListResponse The UserMessageDeleteConversationListResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationListResponse 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 "userMessageDeleteConversationListResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteConversationListResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteConversationListResponse for root element {}userMessageDeleteConversationListResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteConversationListResponse for root element {}userMessageDeleteConversationListResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteConversationListResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageDeleteConversationListResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteConversationListResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteConversationResponse_M
#define DEF_MYSMSAPINS0UserMessageDeleteConversationResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteConversationResponse *_mYSMSAPINS0UserMessageDeleteConversationResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteConversationResponse = (MYSMSAPINS0UserMessageDeleteConversationResponse *) [MYSMSAPINS0UserMessageDeleteConversationResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteConversationResponse;
}

//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 MYSMSAPINS0UserMessageDeleteConversationResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteConversationResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteConversationResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteConversationResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteConversationResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteConversationResponse *_mYSMSAPINS0UserMessageDeleteConversationResponse = [[MYSMSAPINS0UserMessageDeleteConversationResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteConversationResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteConversationResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteConversationResponse autorelease];
  return _mYSMSAPINS0UserMessageDeleteConversationResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteConversationResponse 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 MYSMSAPINS0UserMessageDeleteConversationResponse 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 MYSMSAPINS0UserMessageDeleteConversationResponse from an XML reader. The element to be read is
 * "userMessageDeleteConversationResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteConversationResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteConversationResponse *_userMessageDeleteConversationResponse = 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 userMessageDeleteConversationResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteConversationResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteConversationResponse.");
#endif
    _userMessageDeleteConversationResponse = (MYSMSAPINS0UserMessageDeleteConversationResponse *)[MYSMSAPINS0UserMessageDeleteConversationResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteConversationResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationResponse. Expected element userMessageDeleteConversationResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationResponse. Expected element userMessageDeleteConversationResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteConversationResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationResponse to XML under element name "userMessageDeleteConversationResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteConversationResponse The UserMessageDeleteConversationResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationResponse 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 "userMessageDeleteConversationResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteConversationResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteConversationResponse for root element {}userMessageDeleteConversationResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteConversationResponse for root element {}userMessageDeleteConversationResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteConversationResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageDeleteConversationResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteConversationResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteListResponse_M
#define DEF_MYSMSAPINS0UserMessageDeleteListResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteListResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteListResponse *_mYSMSAPINS0UserMessageDeleteListResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteListResponse = (MYSMSAPINS0UserMessageDeleteListResponse *) [MYSMSAPINS0UserMessageDeleteListResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteListResponse;
}

//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 MYSMSAPINS0UserMessageDeleteListResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteListResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteListResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteListResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteListResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteListResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteListResponse *_mYSMSAPINS0UserMessageDeleteListResponse = [[MYSMSAPINS0UserMessageDeleteListResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteListResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteListResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteListResponse autorelease];
  return _mYSMSAPINS0UserMessageDeleteListResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteListResponse 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 MYSMSAPINS0UserMessageDeleteListResponse 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 MYSMSAPINS0UserMessageDeleteListResponse from an XML reader. The element to be read is
 * "userMessageDeleteListResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteListResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteListResponse *_userMessageDeleteListResponse = 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 userMessageDeleteListResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteListResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteListResponse.");
#endif
    _userMessageDeleteListResponse = (MYSMSAPINS0UserMessageDeleteListResponse *)[MYSMSAPINS0UserMessageDeleteListResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteListResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteListResponse. Expected element userMessageDeleteListResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteListResponse. Expected element userMessageDeleteListResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteListResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteListResponse to XML under element name "userMessageDeleteListResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteListResponse The UserMessageDeleteListResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteListResponse 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 "userMessageDeleteListResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteListResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteListResponse for root element {}userMessageDeleteListResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteListResponse for root element {}userMessageDeleteListResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteListResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageDeleteListResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteListResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteResponse_M
#define DEF_MYSMSAPINS0UserMessageDeleteResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteResponse *_mYSMSAPINS0UserMessageDeleteResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteResponse = (MYSMSAPINS0UserMessageDeleteResponse *) [MYSMSAPINS0UserMessageDeleteResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteResponse;
}

//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 MYSMSAPINS0UserMessageDeleteResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteResponse *_mYSMSAPINS0UserMessageDeleteResponse = [[MYSMSAPINS0UserMessageDeleteResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteResponse autorelease];
  return _mYSMSAPINS0UserMessageDeleteResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteResponse 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 MYSMSAPINS0UserMessageDeleteResponse 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 MYSMSAPINS0UserMessageDeleteResponse from an XML reader. The element to be read is
 * "userMessageDeleteResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteResponse *_userMessageDeleteResponse = 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 userMessageDeleteResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteResponse.");
#endif
    _userMessageDeleteResponse = (MYSMSAPINS0UserMessageDeleteResponse *)[MYSMSAPINS0UserMessageDeleteResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteResponse. Expected element userMessageDeleteResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteResponse. Expected element userMessageDeleteResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteResponse to XML under element name "userMessageDeleteResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteResponse The UserMessageDeleteResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteResponse 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 "userMessageDeleteResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteResponse for root element {}userMessageDeleteResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteResponse for root element {}userMessageDeleteResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageDeleteResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageGetConversationsResponse_M
#define DEF_MYSMSAPINS0UserMessageGetConversationsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageGetConversationsResponse

/**
 * The list of user message conversations.
 */
- (NSArray *) conversations
{
  return _conversations;
}

/**
 * The list of user message conversations.
 */
- (void) setConversations: (NSArray *) newConversations
{
  [newConversations retain];
  [_conversations release];
  _conversations = newConversations;
}

- (void) dealloc
{
  [self setConversations: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageGetConversationsResponse *_mYSMSAPINS0UserMessageGetConversationsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageGetConversationsResponse = (MYSMSAPINS0UserMessageGetConversationsResponse *) [MYSMSAPINS0UserMessageGetConversationsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageGetConversationsResponse;
}

//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 MYSMSAPINS0UserMessageGetConversationsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageGetConversationsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageGetConversationsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageGetConversationsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageGetConversationsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageGetConversationsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageGetConversationsResponse *_mYSMSAPINS0UserMessageGetConversationsResponse = [[MYSMSAPINS0UserMessageGetConversationsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageGetConversationsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageGetConversationsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageGetConversationsResponse autorelease];
  return _mYSMSAPINS0UserMessageGetConversationsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageGetConversationsResponse 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 MYSMSAPINS0UserMessageGetConversationsResponse 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 MYSMSAPINS0UserMessageGetConversationsResponse from an XML reader. The element to be read is
 * "userMessageGetConversationsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageGetConversationsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageGetConversationsResponse *_userMessageGetConversationsResponse = 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 userMessageGetConversationsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageGetConversationsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageGetConversationsResponse.");
#endif
    _userMessageGetConversationsResponse = (MYSMSAPINS0UserMessageGetConversationsResponse *)[MYSMSAPINS0UserMessageGetConversationsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageGetConversationsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetConversationsResponse. Expected element userMessageGetConversationsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetConversationsResponse. Expected element userMessageGetConversationsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageGetConversationsResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageGetConversationsResponse to XML under element name "userMessageGetConversationsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageGetConversationsResponse The UserMessageGetConversationsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageGetConversationsResponse 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 "userMessageGetConversationsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageGetConversationsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageGetConversationsResponse for root element {}userMessageGetConversationsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageGetConversationsResponse for root element {}userMessageGetConversationsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageGetConversationsResponse. 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 "conversations", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}conversations of type {}userMessageConversation.");
#endif

     __child = [MYSMSAPINS0UserMessageConversation readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}conversations of type {}userMessageConversation.");
#endif

    if ([self conversations]) {
      [self setConversations: [[self conversations] arrayByAddingObject: __child]];
    }
    else {
      [self setConversations: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self conversations]) {
    __enumerator = [[self conversations] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "conversations", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}conversations."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}conversations...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}conversations...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}conversations."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageGetConversationsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageGetConversationsResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageGetMessagesResponse_M
#define DEF_MYSMSAPINS0UserMessageGetMessagesResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageGetMessagesResponse

/**
 * The list of user message conversations.
 */
- (NSArray *) messages
{
  return _messages;
}

/**
 * The list of user message conversations.
 */
- (void) setMessages: (NSArray *) newMessages
{
  [newMessages retain];
  [_messages release];
  _messages = newMessages;
}

- (void) dealloc
{
  [self setMessages: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageGetMessagesResponse *_mYSMSAPINS0UserMessageGetMessagesResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageGetMessagesResponse = (MYSMSAPINS0UserMessageGetMessagesResponse *) [MYSMSAPINS0UserMessageGetMessagesResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageGetMessagesResponse;
}

//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 MYSMSAPINS0UserMessageGetMessagesResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageGetMessagesResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageGetMessagesResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageGetMessagesResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageGetMessagesResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageGetMessagesResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageGetMessagesResponse *_mYSMSAPINS0UserMessageGetMessagesResponse = [[MYSMSAPINS0UserMessageGetMessagesResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageGetMessagesResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageGetMessagesResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageGetMessagesResponse autorelease];
  return _mYSMSAPINS0UserMessageGetMessagesResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageGetMessagesResponse 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 MYSMSAPINS0UserMessageGetMessagesResponse 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 MYSMSAPINS0UserMessageGetMessagesResponse from an XML reader. The element to be read is
 * "userMessageGetMessagesResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageGetMessagesResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageGetMessagesResponse *_userMessageGetMessagesResponse = 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 userMessageGetMessagesResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageGetMessagesResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageGetMessagesResponse.");
#endif
    _userMessageGetMessagesResponse = (MYSMSAPINS0UserMessageGetMessagesResponse *)[MYSMSAPINS0UserMessageGetMessagesResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageGetMessagesResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetMessagesResponse. Expected element userMessageGetMessagesResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetMessagesResponse. Expected element userMessageGetMessagesResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageGetMessagesResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageGetMessagesResponse to XML under element name "userMessageGetMessagesResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageGetMessagesResponse The UserMessageGetMessagesResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageGetMessagesResponse 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 "userMessageGetMessagesResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageGetMessagesResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageGetMessagesResponse for root element {}userMessageGetMessagesResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageGetMessagesResponse for root element {}userMessageGetMessagesResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageGetMessagesResponse. 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 "messages", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}messages of type {}userMessageMessage.");
#endif

     __child = [MYSMSAPINS0UserMessageMessage readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}messages of type {}userMessageMessage.");
#endif

    if ([self messages]) {
      [self setMessages: [[self messages] arrayByAddingObject: __child]];
    }
    else {
      [self setMessages: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self messages]) {
    __enumerator = [[self messages] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messages", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}messages."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}messages...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}messages...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}messages."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageGetMessagesResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageGetMessagesResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageInsertResponse_M
#define DEF_MYSMSAPINS0UserMessageInsertResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageInsertResponse

/**
 * The message id of the message which was inserted.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The message id of the message which was inserted.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageInsertResponse *_mYSMSAPINS0UserMessageInsertResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageInsertResponse = (MYSMSAPINS0UserMessageInsertResponse *) [MYSMSAPINS0UserMessageInsertResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageInsertResponse;
}

//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 MYSMSAPINS0UserMessageInsertResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageInsertResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageInsertResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageInsertResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageInsertResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageInsertResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageInsertResponse *_mYSMSAPINS0UserMessageInsertResponse = [[MYSMSAPINS0UserMessageInsertResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageInsertResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageInsertResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageInsertResponse autorelease];
  return _mYSMSAPINS0UserMessageInsertResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageInsertResponse 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 MYSMSAPINS0UserMessageInsertResponse 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 MYSMSAPINS0UserMessageInsertResponse from an XML reader. The element to be read is
 * "userMessageInsertResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageInsertResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageInsertResponse *_userMessageInsertResponse = 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 userMessageInsertResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageInsertResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageInsertResponse.");
#endif
    _userMessageInsertResponse = (MYSMSAPINS0UserMessageInsertResponse *)[MYSMSAPINS0UserMessageInsertResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageInsertResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageInsertResponse. Expected element userMessageInsertResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageInsertResponse. Expected element userMessageInsertResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageInsertResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageInsertResponse to XML under element name "userMessageInsertResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageInsertResponse The UserMessageInsertResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageInsertResponse 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 "userMessageInsertResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageInsertResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageInsertResponse for root element {}userMessageInsertResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageInsertResponse for root element {}userMessageInsertResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageInsertResponse. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageInsertResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageInsertResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageReadConversationResponse_M
#define DEF_MYSMSAPINS0UserMessageReadConversationResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageReadConversationResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageReadConversationResponse *_mYSMSAPINS0UserMessageReadConversationResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageReadConversationResponse = (MYSMSAPINS0UserMessageReadConversationResponse *) [MYSMSAPINS0UserMessageReadConversationResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageReadConversationResponse;
}

//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 MYSMSAPINS0UserMessageReadConversationResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageReadConversationResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageReadConversationResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageReadConversationResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageReadConversationResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageReadConversationResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageReadConversationResponse *_mYSMSAPINS0UserMessageReadConversationResponse = [[MYSMSAPINS0UserMessageReadConversationResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageReadConversationResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageReadConversationResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageReadConversationResponse autorelease];
  return _mYSMSAPINS0UserMessageReadConversationResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageReadConversationResponse 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 MYSMSAPINS0UserMessageReadConversationResponse 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 MYSMSAPINS0UserMessageReadConversationResponse from an XML reader. The element to be read is
 * "userMessageReadConversationResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageReadConversationResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageReadConversationResponse *_userMessageReadConversationResponse = 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 userMessageReadConversationResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageReadConversationResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageReadConversationResponse.");
#endif
    _userMessageReadConversationResponse = (MYSMSAPINS0UserMessageReadConversationResponse *)[MYSMSAPINS0UserMessageReadConversationResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageReadConversationResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageReadConversationResponse. Expected element userMessageReadConversationResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageReadConversationResponse. Expected element userMessageReadConversationResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageReadConversationResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageReadConversationResponse to XML under element name "userMessageReadConversationResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageReadConversationResponse The UserMessageReadConversationResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageReadConversationResponse 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 "userMessageReadConversationResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageReadConversationResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageReadConversationResponse for root element {}userMessageReadConversationResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageReadConversationResponse for root element {}userMessageReadConversationResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageReadConversationResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageReadConversationResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageReadConversationResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageSearchResponse_M
#define DEF_MYSMSAPINS0UserMessageSearchResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSearchResponse

/**
 * The list of user message conversations.
 */
- (NSArray *) messages
{
  return _messages;
}

/**
 * The list of user message conversations.
 */
- (void) setMessages: (NSArray *) newMessages
{
  [newMessages retain];
  [_messages release];
  _messages = newMessages;
}

- (void) dealloc
{
  [self setMessages: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSearchResponse *_mYSMSAPINS0UserMessageSearchResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSearchResponse = (MYSMSAPINS0UserMessageSearchResponse *) [MYSMSAPINS0UserMessageSearchResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSearchResponse;
}

//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 MYSMSAPINS0UserMessageSearchResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSearchResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSearchResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSearchResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSearchResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSearchResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSearchResponse *_mYSMSAPINS0UserMessageSearchResponse = [[MYSMSAPINS0UserMessageSearchResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSearchResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSearchResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSearchResponse autorelease];
  return _mYSMSAPINS0UserMessageSearchResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSearchResponse 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 MYSMSAPINS0UserMessageSearchResponse 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 MYSMSAPINS0UserMessageSearchResponse from an XML reader. The element to be read is
 * "userMessageSearchResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSearchResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSearchResponse *_userMessageSearchResponse = 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 userMessageSearchResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSearchResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSearchResponse.");
#endif
    _userMessageSearchResponse = (MYSMSAPINS0UserMessageSearchResponse *)[MYSMSAPINS0UserMessageSearchResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSearchResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSearchResponse. Expected element userMessageSearchResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSearchResponse. Expected element userMessageSearchResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSearchResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageSearchResponse to XML under element name "userMessageSearchResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSearchResponse The UserMessageSearchResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSearchResponse 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 "userMessageSearchResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSearchResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSearchResponse for root element {}userMessageSearchResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSearchResponse for root element {}userMessageSearchResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSearchResponse. 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 "messages", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}messages of type {}userMessageMessage.");
#endif

     __child = [MYSMSAPINS0UserMessageMessage readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}messages of type {}userMessageMessage.");
#endif

    if ([self messages]) {
      [self setMessages: [[self messages] arrayByAddingObject: __child]];
    }
    else {
      [self setMessages: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self messages]) {
    __enumerator = [[self messages] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messages", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}messages."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}messages...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}messages...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}messages."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageSearchResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSearchResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageSyncResponse_M
#define DEF_MYSMSAPINS0UserMessageSyncResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSyncResponse

/**
 * The messages that were modified on the server and needs to be synchronized to the device.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The messages that were modified on the server and needs to be synchronized to the device.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of messages synchronized previously from the device.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of messages synchronized previously from the device.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSyncResponse *_mYSMSAPINS0UserMessageSyncResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSyncResponse = (MYSMSAPINS0UserMessageSyncResponse *) [MYSMSAPINS0UserMessageSyncResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSyncResponse;
}

//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 MYSMSAPINS0UserMessageSyncResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSyncResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSyncResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSyncResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSyncResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSyncResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSyncResponse *_mYSMSAPINS0UserMessageSyncResponse = [[MYSMSAPINS0UserMessageSyncResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSyncResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSyncResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSyncResponse autorelease];
  return _mYSMSAPINS0UserMessageSyncResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSyncResponse 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 MYSMSAPINS0UserMessageSyncResponse 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 MYSMSAPINS0UserMessageSyncResponse from an XML reader. The element to be read is
 * "userMessageSyncResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSyncResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSyncResponse *_userMessageSyncResponse = 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 userMessageSyncResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSyncResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSyncResponse.");
#endif
    _userMessageSyncResponse = (MYSMSAPINS0UserMessageSyncResponse *)[MYSMSAPINS0UserMessageSyncResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSyncResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSyncResponse. Expected element userMessageSyncResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSyncResponse. Expected element userMessageSyncResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSyncResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageSyncResponse to XML under element name "userMessageSyncResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSyncResponse The UserMessageSyncResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSyncResponse 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 "userMessageSyncResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSyncResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSyncResponse for root element {}userMessageSyncResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSyncResponse for root element {}userMessageSyncResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSyncResponse. 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 "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userMessageSync.");
#endif

     __child = [MYSMSAPINS0UserMessageSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userMessageSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userMessageSyncAck.");
#endif

     __child = [MYSMSAPINS0UserMessageSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userMessageSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageSyncResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSyncResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageUnlockListResponse_M
#define DEF_MYSMSAPINS0UserMessageUnlockListResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageUnlockListResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageUnlockListResponse *_mYSMSAPINS0UserMessageUnlockListResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageUnlockListResponse = (MYSMSAPINS0UserMessageUnlockListResponse *) [MYSMSAPINS0UserMessageUnlockListResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageUnlockListResponse;
}

//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 MYSMSAPINS0UserMessageUnlockListResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageUnlockListResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageUnlockListResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageUnlockListResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageUnlockListResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageUnlockListResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageUnlockListResponse *_mYSMSAPINS0UserMessageUnlockListResponse = [[MYSMSAPINS0UserMessageUnlockListResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageUnlockListResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageUnlockListResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageUnlockListResponse autorelease];
  return _mYSMSAPINS0UserMessageUnlockListResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageUnlockListResponse 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 MYSMSAPINS0UserMessageUnlockListResponse 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 MYSMSAPINS0UserMessageUnlockListResponse from an XML reader. The element to be read is
 * "userMessageUnlockListResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageUnlockListResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageUnlockListResponse *_userMessageUnlockListResponse = 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 userMessageUnlockListResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageUnlockListResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageUnlockListResponse.");
#endif
    _userMessageUnlockListResponse = (MYSMSAPINS0UserMessageUnlockListResponse *)[MYSMSAPINS0UserMessageUnlockListResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageUnlockListResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUnlockListResponse. Expected element userMessageUnlockListResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUnlockListResponse. Expected element userMessageUnlockListResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageUnlockListResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageUnlockListResponse to XML under element name "userMessageUnlockListResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageUnlockListResponse The UserMessageUnlockListResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageUnlockListResponse 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 "userMessageUnlockListResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageUnlockListResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageUnlockListResponse for root element {}userMessageUnlockListResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageUnlockListResponse for root element {}userMessageUnlockListResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageUnlockListResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageUnlockListResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageUnlockListResponse_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnectorExtended_M
#define DEF_MYSMSAPINS0UserSmsConnectorExtended_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSmsConnectorExtended

/**
 * (no documentation provided)
 */
- (MYSMSAPINS0SmsConnector *) smsConnector
{
  return _smsConnector;
}

/**
 * (no documentation provided)
 */
- (void) setSmsConnector: (MYSMSAPINS0SmsConnector *) newSmsConnector
{
  [newSmsConnector retain];
  [_smsConnector release];
  _smsConnector = newSmsConnector;
}

- (void) dealloc
{
  [self setSmsConnector: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0UserSmsConnectorExtended */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSmsConnectorExtended (JAXB) <JAXBReading, JAXBWriting, JAXBType>

@end /*interface MYSMSAPINS0UserSmsConnectorExtended (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSmsConnectorExtended (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSmsConnectorExtended from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSmsConnectorExtended defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSmsConnectorExtended *_mYSMSAPINS0UserSmsConnectorExtended = [[MYSMSAPINS0UserSmsConnectorExtended alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSmsConnectorExtended initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSmsConnectorExtended = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSmsConnectorExtended autorelease];
  return _mYSMSAPINS0UserSmsConnectorExtended;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnectorExtended 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 MYSMSAPINS0UserSmsConnectorExtended 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];
}

//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 "smsConnector", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}smsConnector of type {}smsConnector.");
#endif
    __child = [MYSMSAPINS0SmsConnector readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}smsConnector of type {}smsConnector.");
#endif

    [self setSmsConnector: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self smsConnector]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnector", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnector."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsConnector...");
#endif
    [[self smsConnector] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsConnector...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsConnector."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSmsConnectorExtended (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSmsConnectorExtended_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse_M
#define DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse

/**
 * The list of user sms connectors.
 */
- (NSArray *) connectors
{
  return _connectors;
}

/**
 * The list of user sms connectors.
 */
- (void) setConnectors: (NSArray *) newConnectors
{
  [newConnectors retain];
  [_connectors release];
  _connectors = newConnectors;
}

- (void) dealloc
{
  [self setConnectors: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse *_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse = (MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse *) [MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse;
}

//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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse *_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse = [[MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse autorelease];
  return _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse 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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse 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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse from an XML reader. The element to be read is
 * "userSmsConnectorGetConnectorsExtendedResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse *_userSmsConnectorGetConnectorsExtendedResponse = 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 userSmsConnectorGetConnectorsExtendedResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSmsConnectorGetConnectorsExtendedResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSmsConnectorGetConnectorsExtendedResponse.");
#endif
    _userSmsConnectorGetConnectorsExtendedResponse = (MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse *)[MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSmsConnectorGetConnectorsExtendedResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse. Expected element userSmsConnectorGetConnectorsExtendedResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse. Expected element userSmsConnectorGetConnectorsExtendedResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSmsConnectorGetConnectorsExtendedResponse;
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse to XML under element name "userSmsConnectorGetConnectorsExtendedResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSmsConnectorGetConnectorsExtendedResponse The UserSmsConnectorGetConnectorsExtendedResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse 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 "userSmsConnectorGetConnectorsExtendedResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSmsConnectorGetConnectorsExtendedResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSmsConnectorGetConnectorsExtendedResponse for root element {}userSmsConnectorGetConnectorsExtendedResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSmsConnectorGetConnectorsExtendedResponse for root element {}userSmsConnectorGetConnectorsExtendedResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSmsConnectorGetConnectorsExtendedResponse. 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 "connectors", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}connectors of type {}userSmsConnectorExtended.");
#endif

     __child = [MYSMSAPINS0UserSmsConnectorExtended readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}connectors of type {}userSmsConnectorExtended.");
#endif

    if ([self connectors]) {
      [self setConnectors: [[self connectors] arrayByAddingObject: __child]];
    }
    else {
      [self setConnectors: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self connectors]) {
    __enumerator = [[self connectors] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "connectors", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}connectors."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}connectors...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}connectors...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}connectors."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedResponse_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsResponse_M
#define DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSmsConnectorSetConnectorsResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSmsConnectorSetConnectorsResponse *_mYSMSAPINS0UserSmsConnectorSetConnectorsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSmsConnectorSetConnectorsResponse = (MYSMSAPINS0UserSmsConnectorSetConnectorsResponse *) [MYSMSAPINS0UserSmsConnectorSetConnectorsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSmsConnectorSetConnectorsResponse;
}

//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 MYSMSAPINS0UserSmsConnectorSetConnectorsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSmsConnectorSetConnectorsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSmsConnectorSetConnectorsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSmsConnectorSetConnectorsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSmsConnectorSetConnectorsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSmsConnectorSetConnectorsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSmsConnectorSetConnectorsResponse *_mYSMSAPINS0UserSmsConnectorSetConnectorsResponse = [[MYSMSAPINS0UserSmsConnectorSetConnectorsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSmsConnectorSetConnectorsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSmsConnectorSetConnectorsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSmsConnectorSetConnectorsResponse autorelease];
  return _mYSMSAPINS0UserSmsConnectorSetConnectorsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnectorSetConnectorsResponse 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 MYSMSAPINS0UserSmsConnectorSetConnectorsResponse 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 MYSMSAPINS0UserSmsConnectorSetConnectorsResponse from an XML reader. The element to be read is
 * "userSmsConnectorSetConnectorsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSmsConnectorSetConnectorsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSmsConnectorSetConnectorsResponse *_userSmsConnectorSetConnectorsResponse = 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 userSmsConnectorSetConnectorsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSmsConnectorSetConnectorsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSmsConnectorSetConnectorsResponse.");
#endif
    _userSmsConnectorSetConnectorsResponse = (MYSMSAPINS0UserSmsConnectorSetConnectorsResponse *)[MYSMSAPINS0UserSmsConnectorSetConnectorsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSmsConnectorSetConnectorsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorSetConnectorsResponse. Expected element userSmsConnectorSetConnectorsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorSetConnectorsResponse. Expected element userSmsConnectorSetConnectorsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSmsConnectorSetConnectorsResponse;
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorSetConnectorsResponse to XML under element name "userSmsConnectorSetConnectorsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSmsConnectorSetConnectorsResponse The UserSmsConnectorSetConnectorsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorSetConnectorsResponse 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 "userSmsConnectorSetConnectorsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSmsConnectorSetConnectorsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSmsConnectorSetConnectorsResponse for root element {}userSmsConnectorSetConnectorsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSmsConnectorSetConnectorsResponse for root element {}userSmsConnectorSetConnectorsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSmsConnectorSetConnectorsResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSmsConnectorSetConnectorsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsResponse_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionActivateResponse_M
#define DEF_MYSMSAPINS0UserSubscriptionActivateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionActivateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionActivateResponse *_mYSMSAPINS0UserSubscriptionActivateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionActivateResponse = (MYSMSAPINS0UserSubscriptionActivateResponse *) [MYSMSAPINS0UserSubscriptionActivateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionActivateResponse;
}

//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 MYSMSAPINS0UserSubscriptionActivateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionActivateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionActivateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionActivateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionActivateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionActivateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionActivateResponse *_mYSMSAPINS0UserSubscriptionActivateResponse = [[MYSMSAPINS0UserSubscriptionActivateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionActivateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionActivateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionActivateResponse autorelease];
  return _mYSMSAPINS0UserSubscriptionActivateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionActivateResponse 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 MYSMSAPINS0UserSubscriptionActivateResponse 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 MYSMSAPINS0UserSubscriptionActivateResponse from an XML reader. The element to be read is
 * "userSubscriptionActivateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionActivateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionActivateResponse *_userSubscriptionActivateResponse = 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 userSubscriptionActivateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionActivateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionActivateResponse.");
#endif
    _userSubscriptionActivateResponse = (MYSMSAPINS0UserSubscriptionActivateResponse *)[MYSMSAPINS0UserSubscriptionActivateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionActivateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionActivateResponse. Expected element userSubscriptionActivateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionActivateResponse. Expected element userSubscriptionActivateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionActivateResponse;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionActivateResponse to XML under element name "userSubscriptionActivateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionActivateResponse The UserSubscriptionActivateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionActivateResponse 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 "userSubscriptionActivateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionActivateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionActivateResponse for root element {}userSubscriptionActivateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionActivateResponse for root element {}userSubscriptionActivateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionActivateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionActivateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionActivateResponse_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionDeactivateResponse_M
#define DEF_MYSMSAPINS0UserSubscriptionDeactivateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionDeactivateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionDeactivateResponse *_mYSMSAPINS0UserSubscriptionDeactivateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionDeactivateResponse = (MYSMSAPINS0UserSubscriptionDeactivateResponse *) [MYSMSAPINS0UserSubscriptionDeactivateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionDeactivateResponse;
}

//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 MYSMSAPINS0UserSubscriptionDeactivateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionDeactivateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionDeactivateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionDeactivateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionDeactivateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionDeactivateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionDeactivateResponse *_mYSMSAPINS0UserSubscriptionDeactivateResponse = [[MYSMSAPINS0UserSubscriptionDeactivateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionDeactivateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionDeactivateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionDeactivateResponse autorelease];
  return _mYSMSAPINS0UserSubscriptionDeactivateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionDeactivateResponse 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 MYSMSAPINS0UserSubscriptionDeactivateResponse 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 MYSMSAPINS0UserSubscriptionDeactivateResponse from an XML reader. The element to be read is
 * "userSubscriptionDeactivateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionDeactivateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionDeactivateResponse *_userSubscriptionDeactivateResponse = 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 userSubscriptionDeactivateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionDeactivateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionDeactivateResponse.");
#endif
    _userSubscriptionDeactivateResponse = (MYSMSAPINS0UserSubscriptionDeactivateResponse *)[MYSMSAPINS0UserSubscriptionDeactivateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionDeactivateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionDeactivateResponse. Expected element userSubscriptionDeactivateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionDeactivateResponse. Expected element userSubscriptionDeactivateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionDeactivateResponse;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionDeactivateResponse to XML under element name "userSubscriptionDeactivateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionDeactivateResponse The UserSubscriptionDeactivateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionDeactivateResponse 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 "userSubscriptionDeactivateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionDeactivateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionDeactivateResponse for root element {}userSubscriptionDeactivateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionDeactivateResponse for root element {}userSubscriptionDeactivateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionDeactivateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionDeactivateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionDeactivateResponse_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionGetResponse_M
#define DEF_MYSMSAPINS0UserSubscriptionGetResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionGetResponse

/**
 * The product id of the subscription or zero if their is no subscription
 */
- (int) productId
{
  return _productId;
}

/**
 * The product id of the subscription or zero if their is no subscription
 */
- (void) setProductId: (int) newProductId
{
  _productId = newProductId;
}

/**
 * The period end date of the subscription
 */
- (NSDate *) periodEnd
{
  return _periodEnd;
}

/**
 * The period end date of the subscription
 */
- (void) setPeriodEnd: (NSDate *) newPeriodEnd
{
  [newPeriodEnd retain];
  [_periodEnd release];
  _periodEnd = newPeriodEnd;
}

/**
 * The status of the subscription
 * 
 * 0 .. active (unpayed)
 * 1 .. active
 * 2 .. active but deactivated at period end
 * 3 .. inactive
 */
- (int) status
{
  return _status;
}

/**
 * The status of the subscription
 * 
 * 0 .. active (unpayed)
 * 1 .. active
 * 2 .. active but deactivated at period end
 * 3 .. inactive
 */
- (void) setStatus: (int) newStatus
{
  _status = newStatus;
}

- (void) dealloc
{
  [self setPeriodEnd: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionGetResponse *_mYSMSAPINS0UserSubscriptionGetResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionGetResponse = (MYSMSAPINS0UserSubscriptionGetResponse *) [MYSMSAPINS0UserSubscriptionGetResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionGetResponse;
}

//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 MYSMSAPINS0UserSubscriptionGetResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionGetResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionGetResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionGetResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionGetResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionGetResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionGetResponse *_mYSMSAPINS0UserSubscriptionGetResponse = [[MYSMSAPINS0UserSubscriptionGetResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionGetResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionGetResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionGetResponse autorelease];
  return _mYSMSAPINS0UserSubscriptionGetResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionGetResponse 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 MYSMSAPINS0UserSubscriptionGetResponse 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 MYSMSAPINS0UserSubscriptionGetResponse from an XML reader. The element to be read is
 * "userSubscriptionGetResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionGetResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionGetResponse *_userSubscriptionGetResponse = 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 userSubscriptionGetResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionGetResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionGetResponse.");
#endif
    _userSubscriptionGetResponse = (MYSMSAPINS0UserSubscriptionGetResponse *)[MYSMSAPINS0UserSubscriptionGetResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionGetResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionGetResponse. Expected element userSubscriptionGetResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionGetResponse. Expected element userSubscriptionGetResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionGetResponse;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionGetResponse to XML under element name "userSubscriptionGetResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionGetResponse The UserSubscriptionGetResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionGetResponse 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 "userSubscriptionGetResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionGetResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionGetResponse for root element {}userSubscriptionGetResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionGetResponse for root element {}userSubscriptionGetResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionGetResponse. 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 "productId", 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 setProductId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "periodEnd", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}periodEnd of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}periodEnd of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setPeriodEnd: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_productId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}productId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productId."];
    }
  }
  if ([self periodEnd]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "periodEnd", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}periodEnd."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}periodEnd...");
#endif
    [[self periodEnd] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}periodEnd...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}periodEnd."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}status...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_status);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}status...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}status."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}status."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSubscriptionGetResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionGetResponse_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionLaunchResponse_M
#define DEF_MYSMSAPINS0UserSubscriptionLaunchResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionLaunchResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionLaunchResponse *_mYSMSAPINS0UserSubscriptionLaunchResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionLaunchResponse = (MYSMSAPINS0UserSubscriptionLaunchResponse *) [MYSMSAPINS0UserSubscriptionLaunchResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionLaunchResponse;
}

//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 MYSMSAPINS0UserSubscriptionLaunchResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionLaunchResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionLaunchResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionLaunchResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionLaunchResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionLaunchResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionLaunchResponse *_mYSMSAPINS0UserSubscriptionLaunchResponse = [[MYSMSAPINS0UserSubscriptionLaunchResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionLaunchResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionLaunchResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionLaunchResponse autorelease];
  return _mYSMSAPINS0UserSubscriptionLaunchResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionLaunchResponse 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 MYSMSAPINS0UserSubscriptionLaunchResponse 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 MYSMSAPINS0UserSubscriptionLaunchResponse from an XML reader. The element to be read is
 * "userSubscriptionLaunchResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionLaunchResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionLaunchResponse *_userSubscriptionLaunchResponse = 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 userSubscriptionLaunchResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionLaunchResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionLaunchResponse.");
#endif
    _userSubscriptionLaunchResponse = (MYSMSAPINS0UserSubscriptionLaunchResponse *)[MYSMSAPINS0UserSubscriptionLaunchResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionLaunchResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLaunchResponse. Expected element userSubscriptionLaunchResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLaunchResponse. Expected element userSubscriptionLaunchResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionLaunchResponse;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLaunchResponse to XML under element name "userSubscriptionLaunchResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionLaunchResponse The UserSubscriptionLaunchResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLaunchResponse 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 "userSubscriptionLaunchResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionLaunchResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionLaunchResponse for root element {}userSubscriptionLaunchResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionLaunchResponse for root element {}userSubscriptionLaunchResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionLaunchResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionLaunchResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionLaunchResponse_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionLogResponse_M
#define DEF_MYSMSAPINS0UserSubscriptionLogResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionLogResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionLogResponse *_mYSMSAPINS0UserSubscriptionLogResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionLogResponse = (MYSMSAPINS0UserSubscriptionLogResponse *) [MYSMSAPINS0UserSubscriptionLogResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionLogResponse;
}

//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 MYSMSAPINS0UserSubscriptionLogResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionLogResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionLogResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionLogResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionLogResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionLogResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionLogResponse *_mYSMSAPINS0UserSubscriptionLogResponse = [[MYSMSAPINS0UserSubscriptionLogResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionLogResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionLogResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionLogResponse autorelease];
  return _mYSMSAPINS0UserSubscriptionLogResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionLogResponse 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 MYSMSAPINS0UserSubscriptionLogResponse 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 MYSMSAPINS0UserSubscriptionLogResponse from an XML reader. The element to be read is
 * "userSubscriptionLogResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionLogResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionLogResponse *_userSubscriptionLogResponse = 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 userSubscriptionLogResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionLogResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionLogResponse.");
#endif
    _userSubscriptionLogResponse = (MYSMSAPINS0UserSubscriptionLogResponse *)[MYSMSAPINS0UserSubscriptionLogResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionLogResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLogResponse. Expected element userSubscriptionLogResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLogResponse. Expected element userSubscriptionLogResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionLogResponse;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLogResponse to XML under element name "userSubscriptionLogResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionLogResponse The UserSubscriptionLogResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLogResponse 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 "userSubscriptionLogResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionLogResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionLogResponse for root element {}userSubscriptionLogResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionLogResponse for root element {}userSubscriptionLogResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionLogResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionLogResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionLogResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageUpdateResponse_M
#define DEF_MYSMSAPINS0UserMessageUpdateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageUpdateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageUpdateResponse *_mYSMSAPINS0UserMessageUpdateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageUpdateResponse = (MYSMSAPINS0UserMessageUpdateResponse *) [MYSMSAPINS0UserMessageUpdateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageUpdateResponse;
}

//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 MYSMSAPINS0UserMessageUpdateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageUpdateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageUpdateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageUpdateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageUpdateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageUpdateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageUpdateResponse *_mYSMSAPINS0UserMessageUpdateResponse = [[MYSMSAPINS0UserMessageUpdateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageUpdateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageUpdateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageUpdateResponse autorelease];
  return _mYSMSAPINS0UserMessageUpdateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageUpdateResponse 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 MYSMSAPINS0UserMessageUpdateResponse 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 MYSMSAPINS0UserMessageUpdateResponse from an XML reader. The element to be read is
 * "userMessageUpdateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageUpdateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageUpdateResponse *_userMessageUpdateResponse = 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 userMessageUpdateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageUpdateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageUpdateResponse.");
#endif
    _userMessageUpdateResponse = (MYSMSAPINS0UserMessageUpdateResponse *)[MYSMSAPINS0UserMessageUpdateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageUpdateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUpdateResponse. Expected element userMessageUpdateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUpdateResponse. Expected element userMessageUpdateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageUpdateResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageUpdateResponse to XML under element name "userMessageUpdateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageUpdateResponse The UserMessageUpdateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageUpdateResponse 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 "userMessageUpdateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageUpdateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageUpdateResponse for root element {}userMessageUpdateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageUpdateResponse for root element {}userMessageUpdateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageUpdateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageUpdateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageUpdateResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageSendResponse_M
#define DEF_MYSMSAPINS0UserMessageSendResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSendResponse

/**
 * The (server) message id of newly created outgoing message.
 * 
 * The message will be synchronized with the next message sync.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id of newly created outgoing message.
 * 
 * The message will be synchronized with the next message sync.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

- (void) dealloc
{
  [self setDateSent: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSendResponse *_mYSMSAPINS0UserMessageSendResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSendResponse = (MYSMSAPINS0UserMessageSendResponse *) [MYSMSAPINS0UserMessageSendResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSendResponse;
}

//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 MYSMSAPINS0UserMessageSendResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSendResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSendResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSendResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSendResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSendResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSendResponse *_mYSMSAPINS0UserMessageSendResponse = [[MYSMSAPINS0UserMessageSendResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSendResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSendResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSendResponse autorelease];
  return _mYSMSAPINS0UserMessageSendResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSendResponse 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 MYSMSAPINS0UserMessageSendResponse 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 MYSMSAPINS0UserMessageSendResponse from an XML reader. The element to be read is
 * "userMessageSendResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSendResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSendResponse *_userMessageSendResponse = 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 userMessageSendResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSendResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSendResponse.");
#endif
    _userMessageSendResponse = (MYSMSAPINS0UserMessageSendResponse *)[MYSMSAPINS0UserMessageSendResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSendResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSendResponse. Expected element userMessageSendResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSendResponse. Expected element userMessageSendResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSendResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageSendResponse to XML under element name "userMessageSendResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSendResponse The UserMessageSendResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSendResponse 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 "userMessageSendResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSendResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSendResponse for root element {}userMessageSendResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSendResponse for root element {}userMessageSendResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSendResponse. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSent: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
  if ([self dateSent]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSent...");
#endif
    [[self dateSent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSent...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSent."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageSendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSendResponse_M */
#ifndef DEF_MYSMSAPINS0UserMessageLockListResponse_M
#define DEF_MYSMSAPINS0UserMessageLockListResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageLockListResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageLockListResponse *_mYSMSAPINS0UserMessageLockListResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageLockListResponse = (MYSMSAPINS0UserMessageLockListResponse *) [MYSMSAPINS0UserMessageLockListResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageLockListResponse;
}

//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 MYSMSAPINS0UserMessageLockListResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageLockListResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageLockListResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageLockListResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageLockListResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageLockListResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageLockListResponse *_mYSMSAPINS0UserMessageLockListResponse = [[MYSMSAPINS0UserMessageLockListResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageLockListResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageLockListResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageLockListResponse autorelease];
  return _mYSMSAPINS0UserMessageLockListResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageLockListResponse 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 MYSMSAPINS0UserMessageLockListResponse 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 MYSMSAPINS0UserMessageLockListResponse from an XML reader. The element to be read is
 * "userMessageLockListResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageLockListResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageLockListResponse *_userMessageLockListResponse = 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 userMessageLockListResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageLockListResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageLockListResponse.");
#endif
    _userMessageLockListResponse = (MYSMSAPINS0UserMessageLockListResponse *)[MYSMSAPINS0UserMessageLockListResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageLockListResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageLockListResponse. Expected element userMessageLockListResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageLockListResponse. Expected element userMessageLockListResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageLockListResponse;
}

/**
 * Writes this MYSMSAPINS0UserMessageLockListResponse to XML under element name "userMessageLockListResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageLockListResponse The UserMessageLockListResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageLockListResponse 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 "userMessageLockListResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageLockListResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageLockListResponse for root element {}userMessageLockListResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageLockListResponse for root element {}userMessageLockListResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageLockListResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageLockListResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageLockListResponse_M */
#ifndef DEF_MYSMSAPINS0UserContactOverrideUpdateResponse_M
#define DEF_MYSMSAPINS0UserContactOverrideUpdateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactOverrideUpdateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactOverrideUpdateResponse *_mYSMSAPINS0UserContactOverrideUpdateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactOverrideUpdateResponse = (MYSMSAPINS0UserContactOverrideUpdateResponse *) [MYSMSAPINS0UserContactOverrideUpdateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactOverrideUpdateResponse;
}

//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 MYSMSAPINS0UserContactOverrideUpdateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactOverrideUpdateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactOverrideUpdateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactOverrideUpdateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactOverrideUpdateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactOverrideUpdateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactOverrideUpdateResponse *_mYSMSAPINS0UserContactOverrideUpdateResponse = [[MYSMSAPINS0UserContactOverrideUpdateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactOverrideUpdateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactOverrideUpdateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactOverrideUpdateResponse autorelease];
  return _mYSMSAPINS0UserContactOverrideUpdateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactOverrideUpdateResponse 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 MYSMSAPINS0UserContactOverrideUpdateResponse 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 MYSMSAPINS0UserContactOverrideUpdateResponse from an XML reader. The element to be read is
 * "userContactOverrideUpdateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactOverrideUpdateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactOverrideUpdateResponse *_userContactOverrideUpdateResponse = 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 userContactOverrideUpdateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactOverrideUpdateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactOverrideUpdateResponse.");
#endif
    _userContactOverrideUpdateResponse = (MYSMSAPINS0UserContactOverrideUpdateResponse *)[MYSMSAPINS0UserContactOverrideUpdateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactOverrideUpdateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactOverrideUpdateResponse. Expected element userContactOverrideUpdateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactOverrideUpdateResponse. Expected element userContactOverrideUpdateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactOverrideUpdateResponse;
}

/**
 * Writes this MYSMSAPINS0UserContactOverrideUpdateResponse to XML under element name "userContactOverrideUpdateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactOverrideUpdateResponse The UserContactOverrideUpdateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactOverrideUpdateResponse 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 "userContactOverrideUpdateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactOverrideUpdateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactOverrideUpdateResponse for root element {}userContactOverrideUpdateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactOverrideUpdateResponse for root element {}userContactOverrideUpdateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactOverrideUpdateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserContactOverrideUpdateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactOverrideUpdateResponse_M */
#ifndef DEF_MYSMSAPINS0UserContactGetContactsResponse_M
#define DEF_MYSMSAPINS0UserContactGetContactsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactGetContactsResponse

/**
 * The list of user contacts.
 */
- (NSArray *) contacts
{
  return _contacts;
}

/**
 * The list of user contacts.
 */
- (void) setContacts: (NSArray *) newContacts
{
  [newContacts retain];
  [_contacts release];
  _contacts = newContacts;
}

/**
 * (no documentation provided)
 */
- (NSArray *) contactOverrides
{
  return _contactOverrides;
}

/**
 * (no documentation provided)
 */
- (void) setContactOverrides: (NSArray *) newContactOverrides
{
  [newContactOverrides retain];
  [_contactOverrides release];
  _contactOverrides = newContactOverrides;
}

- (void) dealloc
{
  [self setContacts: nil];
  [self setContactOverrides: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactGetContactsResponse *_mYSMSAPINS0UserContactGetContactsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactGetContactsResponse = (MYSMSAPINS0UserContactGetContactsResponse *) [MYSMSAPINS0UserContactGetContactsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactGetContactsResponse;
}

//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 MYSMSAPINS0UserContactGetContactsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactGetContactsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactGetContactsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactGetContactsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactGetContactsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactGetContactsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactGetContactsResponse *_mYSMSAPINS0UserContactGetContactsResponse = [[MYSMSAPINS0UserContactGetContactsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactGetContactsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactGetContactsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactGetContactsResponse autorelease];
  return _mYSMSAPINS0UserContactGetContactsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactGetContactsResponse 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 MYSMSAPINS0UserContactGetContactsResponse 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 MYSMSAPINS0UserContactGetContactsResponse from an XML reader. The element to be read is
 * "userContactGetContactsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactGetContactsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactGetContactsResponse *_userContactGetContactsResponse = 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 userContactGetContactsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactGetContactsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactGetContactsResponse.");
#endif
    _userContactGetContactsResponse = (MYSMSAPINS0UserContactGetContactsResponse *)[MYSMSAPINS0UserContactGetContactsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactGetContactsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetContactsResponse. Expected element userContactGetContactsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetContactsResponse. Expected element userContactGetContactsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactGetContactsResponse;
}

/**
 * Writes this MYSMSAPINS0UserContactGetContactsResponse to XML under element name "userContactGetContactsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactGetContactsResponse The UserContactGetContactsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactGetContactsResponse 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 "userContactGetContactsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactGetContactsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactGetContactsResponse for root element {}userContactGetContactsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactGetContactsResponse for root element {}userContactGetContactsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactGetContactsResponse. 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 "contacts", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}contacts of type {}userContact.");
#endif

     __child = [MYSMSAPINS0UserContact readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}contacts of type {}userContact.");
#endif

    if ([self contacts]) {
      [self setContacts: [[self contacts] arrayByAddingObject: __child]];
    }
    else {
      [self setContacts: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "contactOverrides", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}contactOverrides of type {}userContactOverride.");
#endif

     __child = [MYSMSAPINS0UserContactOverride readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}contactOverrides of type {}userContactOverride.");
#endif

    if ([self contactOverrides]) {
      [self setContactOverrides: [[self contactOverrides] arrayByAddingObject: __child]];
    }
    else {
      [self setContactOverrides: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self contacts]) {
    __enumerator = [[self contacts] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contacts", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}contacts."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}contacts...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}contacts...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}contacts."];
      }
    } //end item iterator.
  }
  if ([self contactOverrides]) {
    __enumerator = [[self contactOverrides] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contactOverrides", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}contactOverrides."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}contactOverrides...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}contactOverrides...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}contactOverrides."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserContactGetContactsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactGetContactsResponse_M */
#ifndef DEF_MYSMSAPINS0UserCallReadAllResponse_M
#define DEF_MYSMSAPINS0UserCallReadAllResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallReadAllResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallReadAllResponse *_mYSMSAPINS0UserCallReadAllResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallReadAllResponse = (MYSMSAPINS0UserCallReadAllResponse *) [MYSMSAPINS0UserCallReadAllResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallReadAllResponse;
}

//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 MYSMSAPINS0UserCallReadAllResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallReadAllResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallReadAllResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallReadAllResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallReadAllResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallReadAllResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallReadAllResponse *_mYSMSAPINS0UserCallReadAllResponse = [[MYSMSAPINS0UserCallReadAllResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallReadAllResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallReadAllResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallReadAllResponse autorelease];
  return _mYSMSAPINS0UserCallReadAllResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallReadAllResponse 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 MYSMSAPINS0UserCallReadAllResponse 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 MYSMSAPINS0UserCallReadAllResponse from an XML reader. The element to be read is
 * "userCallReadAllResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallReadAllResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallReadAllResponse *_userCallReadAllResponse = 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 userCallReadAllResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallReadAllResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallReadAllResponse.");
#endif
    _userCallReadAllResponse = (MYSMSAPINS0UserCallReadAllResponse *)[MYSMSAPINS0UserCallReadAllResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallReadAllResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallReadAllResponse. Expected element userCallReadAllResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallReadAllResponse. Expected element userCallReadAllResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallReadAllResponse;
}

/**
 * Writes this MYSMSAPINS0UserCallReadAllResponse to XML under element name "userCallReadAllResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallReadAllResponse The UserCallReadAllResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallReadAllResponse 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 "userCallReadAllResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallReadAllResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallReadAllResponse for root element {}userCallReadAllResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallReadAllResponse for root element {}userCallReadAllResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallReadAllResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallReadAllResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallReadAllResponse_M */
#ifndef DEF_MYSMSAPINS0UserVerifyMsisdnResponse_M
#define DEF_MYSMSAPINS0UserVerifyMsisdnResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserVerifyMsisdnResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserVerifyMsisdnResponse *_mYSMSAPINS0UserVerifyMsisdnResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserVerifyMsisdnResponse = (MYSMSAPINS0UserVerifyMsisdnResponse *) [MYSMSAPINS0UserVerifyMsisdnResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserVerifyMsisdnResponse;
}

//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 MYSMSAPINS0UserVerifyMsisdnResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserVerifyMsisdnResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserVerifyMsisdnResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserVerifyMsisdnResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserVerifyMsisdnResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserVerifyMsisdnResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserVerifyMsisdnResponse *_mYSMSAPINS0UserVerifyMsisdnResponse = [[MYSMSAPINS0UserVerifyMsisdnResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserVerifyMsisdnResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserVerifyMsisdnResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserVerifyMsisdnResponse autorelease];
  return _mYSMSAPINS0UserVerifyMsisdnResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserVerifyMsisdnResponse 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 MYSMSAPINS0UserVerifyMsisdnResponse 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 MYSMSAPINS0UserVerifyMsisdnResponse from an XML reader. The element to be read is
 * "userVerifyMsisdnResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserVerifyMsisdnResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserVerifyMsisdnResponse *_userVerifyMsisdnResponse = 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 userVerifyMsisdnResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userVerifyMsisdnResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userVerifyMsisdnResponse.");
#endif
    _userVerifyMsisdnResponse = (MYSMSAPINS0UserVerifyMsisdnResponse *)[MYSMSAPINS0UserVerifyMsisdnResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userVerifyMsisdnResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserVerifyMsisdnResponse. Expected element userVerifyMsisdnResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserVerifyMsisdnResponse. Expected element userVerifyMsisdnResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userVerifyMsisdnResponse;
}

/**
 * Writes this MYSMSAPINS0UserVerifyMsisdnResponse to XML under element name "userVerifyMsisdnResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userVerifyMsisdnResponse The UserVerifyMsisdnResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserVerifyMsisdnResponse 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 "userVerifyMsisdnResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userVerifyMsisdnResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userVerifyMsisdnResponse for root element {}userVerifyMsisdnResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userVerifyMsisdnResponse for root element {}userVerifyMsisdnResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userVerifyMsisdnResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserVerifyMsisdnResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserVerifyMsisdnResponse_M */
#ifndef DEF_MYSMSAPINS0UserLoginResponse_M
#define DEF_MYSMSAPINS0UserLoginResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserLoginResponse

/**
 * The authentication token
 */
- (NSString *) authToken
{
  return _authToken;
}

/**
 * The authentication token
 */
- (void) setAuthToken: (NSString *) newAuthToken
{
  [newAuthToken retain];
  [_authToken release];
  _authToken = newAuthToken;
}

/**
 * The info which can be configured per api key.
 */
- (NSString *) info
{
  return _info;
}

/**
 * The info which can be configured per api key.
 */
- (void) setInfo: (NSString *) newInfo
{
  [newInfo retain];
  [_info release];
  _info = newInfo;
}

/**
 * The date when the user was last verified
 */
- (NSDate *) dateVerified
{
  return _dateVerified;
}

/**
 * The date when the user was last verified
 */
- (void) setDateVerified: (NSDate *) newDateVerified
{
  [newDateVerified retain];
  [_dateVerified release];
  _dateVerified = newDateVerified;
}

/**
 * The iso country code http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
 */
- (NSString *) countryCode
{
  return _countryCode;
}

/**
 * The iso country code http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
 */
- (void) setCountryCode: (NSString *) newCountryCode
{
  [newCountryCode retain];
  [_countryCode release];
  _countryCode = newCountryCode;
}

/**
 * The international dial prefix http://en.wikipedia.org/wiki/List_of_country_calling_codes for the home country of this account
 */
- (int) dialPrefix
{
  return _dialPrefix;
}

/**
 * The international dial prefix http://en.wikipedia.org/wiki/List_of_country_calling_codes for the home country of this account
 */
- (void) setDialPrefix: (int) newDialPrefix
{
  _dialPrefix = newDialPrefix;
}

/**
 * The iso currency code http://en.wikipedia.org/wiki/ISO_currency_code
 */
- (NSString *) currencyCode
{
  return _currencyCode;
}

/**
 * The iso currency code http://en.wikipedia.org/wiki/ISO_currency_code
 */
- (void) setCurrencyCode: (NSString *) newCurrencyCode
{
  [newCurrencyCode retain];
  [_currencyCode release];
  _currencyCode = newCurrencyCode;
}

- (void) dealloc
{
  [self setAuthToken: nil];
  [self setInfo: nil];
  [self setDateVerified: nil];
  [self setCountryCode: nil];
  [self setCurrencyCode: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserLoginResponse *_mYSMSAPINS0UserLoginResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserLoginResponse = (MYSMSAPINS0UserLoginResponse *) [MYSMSAPINS0UserLoginResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserLoginResponse;
}

//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 MYSMSAPINS0UserLoginResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserLoginResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserLoginResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserLoginResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserLoginResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserLoginResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserLoginResponse *_mYSMSAPINS0UserLoginResponse = [[MYSMSAPINS0UserLoginResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserLoginResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserLoginResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserLoginResponse autorelease];
  return _mYSMSAPINS0UserLoginResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserLoginResponse 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 MYSMSAPINS0UserLoginResponse 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 MYSMSAPINS0UserLoginResponse from an XML reader. The element to be read is
 * "userLoginResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserLoginResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserLoginResponse *_userLoginResponse = 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 userLoginResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userLoginResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userLoginResponse.");
#endif
    _userLoginResponse = (MYSMSAPINS0UserLoginResponse *)[MYSMSAPINS0UserLoginResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userLoginResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserLoginResponse. Expected element userLoginResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserLoginResponse. Expected element userLoginResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userLoginResponse;
}

/**
 * Writes this MYSMSAPINS0UserLoginResponse to XML under element name "userLoginResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userLoginResponse The UserLoginResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserLoginResponse 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 "userLoginResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userLoginResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userLoginResponse for root element {}userLoginResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userLoginResponse for root element {}userLoginResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userLoginResponse. 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 "authToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}authToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}authToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAuthToken: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "info", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}info of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}info of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setInfo: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateVerified", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateVerified of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateVerified of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateVerified: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "countryCode", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}countryCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setCountryCode: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dialPrefix", 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 setDialPrefix: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "currencyCode", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}currencyCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setCurrencyCode: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self authToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "authToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}authToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}authToken...");
#endif
    [[self authToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}authToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}authToken."];
    }
  }
  if ([self info]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "info", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}info."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}info...");
#endif
    [[self info] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}info...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}info."];
    }
  }
  if ([self dateVerified]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateVerified", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateVerified."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateVerified...");
#endif
    [[self dateVerified] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateVerified...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateVerified."];
    }
  }
  if ([self countryCode]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "countryCode", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}countryCode."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}countryCode...");
#endif
    [[self countryCode] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}countryCode...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}countryCode."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dialPrefix", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dialPrefix."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dialPrefix...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_dialPrefix);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dialPrefix...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}dialPrefix."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dialPrefix."];
    }
  }
  if ([self currencyCode]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "currencyCode", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}currencyCode."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}currencyCode...");
#endif
    [[self currencyCode] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}currencyCode...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}currencyCode."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserLoginResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserLoginResponse_M */
#ifndef DEF_MYSMSAPINS0UserGetSmsRoutingResponse_M
#define DEF_MYSMSAPINS0UserGetSmsRoutingResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetSmsRoutingResponse

/**
 * The actual sms routing.
 * <br/>
 * 0 .. send sms over sim<br/>
 * 1 .. send sms over mysms<br/>
 * 2 .. send sms over a2a <br/>
 * or a sms connector id<br/>
 */
- (int) smsRouting
{
  return _smsRouting;
}

/**
 * The actual sms routing.
 * <br/>
 * 0 .. send sms over sim<br/>
 * 1 .. send sms over mysms<br/>
 * 2 .. send sms over a2a <br/>
 * or a sms connector id<br/>
 */
- (void) setSmsRouting: (int) newSmsRouting
{
  _smsRouting = newSmsRouting;
}

/**
 * Returns true if the sms routing was previously saved for that msisdn
 */
- (BOOL) saved
{
  return _saved;
}

/**
 * Returns true if the sms routing was previously saved for that msisdn
 */
- (void) setSaved: (BOOL) newSaved
{
  _saved = newSaved;
}

/**
 * Returns true if the msisdn is available for an a2a message
 */
- (BOOL) a2aAvailable
{
  return _a2aAvailable;
}

/**
 * Returns true if the msisdn is available for an a2a message
 */
- (void) setA2aAvailable: (BOOL) newA2aAvailable
{
  _a2aAvailable = newA2aAvailable;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetSmsRoutingResponse *_mYSMSAPINS0UserGetSmsRoutingResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetSmsRoutingResponse = (MYSMSAPINS0UserGetSmsRoutingResponse *) [MYSMSAPINS0UserGetSmsRoutingResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetSmsRoutingResponse;
}

//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 MYSMSAPINS0UserGetSmsRoutingResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetSmsRoutingResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetSmsRoutingResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetSmsRoutingResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetSmsRoutingResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetSmsRoutingResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetSmsRoutingResponse *_mYSMSAPINS0UserGetSmsRoutingResponse = [[MYSMSAPINS0UserGetSmsRoutingResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetSmsRoutingResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetSmsRoutingResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetSmsRoutingResponse autorelease];
  return _mYSMSAPINS0UserGetSmsRoutingResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetSmsRoutingResponse 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 MYSMSAPINS0UserGetSmsRoutingResponse 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 MYSMSAPINS0UserGetSmsRoutingResponse from an XML reader. The element to be read is
 * "userGetSmsRoutingResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetSmsRoutingResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetSmsRoutingResponse *_userGetSmsRoutingResponse = 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 userGetSmsRoutingResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetSmsRoutingResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetSmsRoutingResponse.");
#endif
    _userGetSmsRoutingResponse = (MYSMSAPINS0UserGetSmsRoutingResponse *)[MYSMSAPINS0UserGetSmsRoutingResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetSmsRoutingResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSmsRoutingResponse. Expected element userGetSmsRoutingResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSmsRoutingResponse. Expected element userGetSmsRoutingResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetSmsRoutingResponse;
}

/**
 * Writes this MYSMSAPINS0UserGetSmsRoutingResponse to XML under element name "userGetSmsRoutingResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetSmsRoutingResponse The UserGetSmsRoutingResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetSmsRoutingResponse 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 "userGetSmsRoutingResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetSmsRoutingResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetSmsRoutingResponse for root element {}userGetSmsRoutingResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetSmsRoutingResponse for root element {}userGetSmsRoutingResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetSmsRoutingResponse. 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 "smsRouting", 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 setSmsRouting: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "saved", 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 setSaved: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "a2aAvailable", 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 setA2aAvailable: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsRouting", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsRouting."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsRouting...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsRouting);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsRouting...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsRouting."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsRouting."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "saved", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}saved."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}saved...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_saved);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}saved...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}saved."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}saved."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "a2aAvailable", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}a2aAvailable."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}a2aAvailable...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_a2aAvailable);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}a2aAvailable...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}a2aAvailable."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}a2aAvailable."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserGetSmsRoutingResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetSmsRoutingResponse_M */
#ifndef DEF_MYSMSAPINS0UserChangePasswordResponse_M
#define DEF_MYSMSAPINS0UserChangePasswordResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserChangePasswordResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserChangePasswordResponse *_mYSMSAPINS0UserChangePasswordResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserChangePasswordResponse = (MYSMSAPINS0UserChangePasswordResponse *) [MYSMSAPINS0UserChangePasswordResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserChangePasswordResponse;
}

//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 MYSMSAPINS0UserChangePasswordResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserChangePasswordResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserChangePasswordResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserChangePasswordResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserChangePasswordResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserChangePasswordResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserChangePasswordResponse *_mYSMSAPINS0UserChangePasswordResponse = [[MYSMSAPINS0UserChangePasswordResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserChangePasswordResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserChangePasswordResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserChangePasswordResponse autorelease];
  return _mYSMSAPINS0UserChangePasswordResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0UserChangePasswordResponse 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 MYSMSAPINS0UserChangePasswordResponse 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 MYSMSAPINS0UserChangePasswordResponse from an XML reader. The element to be read is
 * "userChangePasswordResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserChangePasswordResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserChangePasswordResponse *_userChangePasswordResponse = 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 userChangePasswordResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userChangePasswordResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userChangePasswordResponse.");
#endif
    _userChangePasswordResponse = (MYSMSAPINS0UserChangePasswordResponse *)[MYSMSAPINS0UserChangePasswordResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userChangePasswordResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserChangePasswordResponse. Expected element userChangePasswordResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserChangePasswordResponse. Expected element userChangePasswordResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userChangePasswordResponse;
}

/**
 * Writes this MYSMSAPINS0UserChangePasswordResponse to XML under element name "userChangePasswordResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userChangePasswordResponse The UserChangePasswordResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserChangePasswordResponse 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 "userChangePasswordResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userChangePasswordResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userChangePasswordResponse for root element {}userChangePasswordResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userChangePasswordResponse for root element {}userChangePasswordResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userChangePasswordResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserChangePasswordResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0UserChangePasswordResponse_M */
#ifndef DEF_MYSMSAPINS0ShopStartPaymentResponse_M
#define DEF_MYSMSAPINS0ShopStartPaymentResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopStartPaymentResponse

/**
 * This is true if the payment was successful, otherwise the payment needs
 * perhaps a redirect or some time too complete.
 */
- (BOOL) payed
{
  return _payed;
}

/**
 * This is true if the payment was successful, otherwise the payment needs
 * perhaps a redirect or some time too complete.
 */
- (void) setPayed: (BOOL) newPayed
{
  _payed = newPayed;
}

/**
 * The transaction id of the payment process.
 * This id is needed if you want to check the status of a transaction.
 */
- (int) transactionId
{
  return _transactionId;
}

/**
 * The transaction id of the payment process.
 * This id is needed if you want to check the status of a transaction.
 */
- (void) setTransactionId: (int) newTransactionId
{
  _transactionId = newTransactionId;
}

/**
 * The redirect url where to user should go with a browser to complete the request.
 * After completion (ok or nok) the browser window will be closed. Use the check payment
 * request to get status.
 */
- (NSString *) redirectUrl
{
  return _redirectUrl;
}

/**
 * The redirect url where to user should go with a browser to complete the request.
 * After completion (ok or nok) the browser window will be closed. Use the check payment
 * request to get status.
 */
- (void) setRedirectUrl: (NSString *) newRedirectUrl
{
  [newRedirectUrl retain];
  [_redirectUrl release];
  _redirectUrl = newRedirectUrl;
}

- (void) dealloc
{
  [self setRedirectUrl: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopStartPaymentResponse *_mYSMSAPINS0ShopStartPaymentResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopStartPaymentResponse = (MYSMSAPINS0ShopStartPaymentResponse *) [MYSMSAPINS0ShopStartPaymentResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopStartPaymentResponse;
}

//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 MYSMSAPINS0ShopStartPaymentResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopStartPaymentResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopStartPaymentResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopStartPaymentResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopStartPaymentResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopStartPaymentResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopStartPaymentResponse *_mYSMSAPINS0ShopStartPaymentResponse = [[MYSMSAPINS0ShopStartPaymentResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopStartPaymentResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopStartPaymentResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopStartPaymentResponse autorelease];
  return _mYSMSAPINS0ShopStartPaymentResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopStartPaymentResponse 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 MYSMSAPINS0ShopStartPaymentResponse 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 MYSMSAPINS0ShopStartPaymentResponse from an XML reader. The element to be read is
 * "shopStartPaymentResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopStartPaymentResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopStartPaymentResponse *_shopStartPaymentResponse = 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 shopStartPaymentResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopStartPaymentResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopStartPaymentResponse.");
#endif
    _shopStartPaymentResponse = (MYSMSAPINS0ShopStartPaymentResponse *)[MYSMSAPINS0ShopStartPaymentResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopStartPaymentResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopStartPaymentResponse. Expected element shopStartPaymentResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopStartPaymentResponse. Expected element shopStartPaymentResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopStartPaymentResponse;
}

/**
 * Writes this MYSMSAPINS0ShopStartPaymentResponse to XML under element name "shopStartPaymentResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopStartPaymentResponse The ShopStartPaymentResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopStartPaymentResponse 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 "shopStartPaymentResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopStartPaymentResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopStartPaymentResponse for root element {}shopStartPaymentResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopStartPaymentResponse for root element {}shopStartPaymentResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopStartPaymentResponse. 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 "payed", 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 setPayed: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "transactionId", 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 setTransactionId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "redirectUrl", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}redirectUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}redirectUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRedirectUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "payed", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}payed."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}payed...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_payed);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}payed...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}payed."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}payed."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}transactionId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}transactionId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_transactionId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}transactionId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}transactionId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}transactionId."];
    }
  }
  if ([self redirectUrl]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "redirectUrl", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}redirectUrl."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}redirectUrl...");
#endif
    [[self redirectUrl] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}redirectUrl...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}redirectUrl."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopStartPaymentResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopStartPaymentResponse_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsResendResponse_M
#define DEF_MYSMSAPINS0RemoteSmsResendResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsResendResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsResendResponse *_mYSMSAPINS0RemoteSmsResendResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsResendResponse = (MYSMSAPINS0RemoteSmsResendResponse *) [MYSMSAPINS0RemoteSmsResendResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsResendResponse;
}

//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 MYSMSAPINS0RemoteSmsResendResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsResendResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsResendResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsResendResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsResendResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsResendResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsResendResponse *_mYSMSAPINS0RemoteSmsResendResponse = [[MYSMSAPINS0RemoteSmsResendResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsResendResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsResendResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsResendResponse autorelease];
  return _mYSMSAPINS0RemoteSmsResendResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsResendResponse 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 MYSMSAPINS0RemoteSmsResendResponse 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 MYSMSAPINS0RemoteSmsResendResponse from an XML reader. The element to be read is
 * "remoteSmsResendResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsResendResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsResendResponse *_remoteSmsResendResponse = 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 remoteSmsResendResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsResendResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsResendResponse.");
#endif
    _remoteSmsResendResponse = (MYSMSAPINS0RemoteSmsResendResponse *)[MYSMSAPINS0RemoteSmsResendResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsResendResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsResendResponse. Expected element remoteSmsResendResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsResendResponse. Expected element remoteSmsResendResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsResendResponse;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsResendResponse to XML under element name "remoteSmsResendResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsResendResponse The RemoteSmsResendResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsResendResponse 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 "remoteSmsResendResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsResendResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsResendResponse for root element {}remoteSmsResendResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsResendResponse for root element {}remoteSmsResendResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsResendResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RemoteSmsResendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsResendResponse_M */
#ifndef DEF_MYSMSAPINS0RegistrationCreateKeyResponse_M
#define DEF_MYSMSAPINS0RegistrationCreateKeyResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCreateKeyResponse

/**
 * The newly created registration key
 */
- (NSString *) registrationKey
{
  return _registrationKey;
}

/**
 * The newly created registration key
 */
- (void) setRegistrationKey: (NSString *) newRegistrationKey
{
  [newRegistrationKey retain];
  [_registrationKey release];
  _registrationKey = newRegistrationKey;
}

- (void) dealloc
{
  [self setRegistrationKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCreateKeyResponse *_mYSMSAPINS0RegistrationCreateKeyResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCreateKeyResponse = (MYSMSAPINS0RegistrationCreateKeyResponse *) [MYSMSAPINS0RegistrationCreateKeyResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCreateKeyResponse;
}

//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 MYSMSAPINS0RegistrationCreateKeyResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCreateKeyResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCreateKeyResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCreateKeyResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCreateKeyResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCreateKeyResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCreateKeyResponse *_mYSMSAPINS0RegistrationCreateKeyResponse = [[MYSMSAPINS0RegistrationCreateKeyResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCreateKeyResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCreateKeyResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCreateKeyResponse autorelease];
  return _mYSMSAPINS0RegistrationCreateKeyResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCreateKeyResponse 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 MYSMSAPINS0RegistrationCreateKeyResponse 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 MYSMSAPINS0RegistrationCreateKeyResponse from an XML reader. The element to be read is
 * "registrationCreateKeyResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCreateKeyResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCreateKeyResponse *_registrationCreateKeyResponse = 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 registrationCreateKeyResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCreateKeyResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCreateKeyResponse.");
#endif
    _registrationCreateKeyResponse = (MYSMSAPINS0RegistrationCreateKeyResponse *)[MYSMSAPINS0RegistrationCreateKeyResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCreateKeyResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateKeyResponse. Expected element registrationCreateKeyResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCreateKeyResponse. Expected element registrationCreateKeyResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCreateKeyResponse;
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateKeyResponse to XML under element name "registrationCreateKeyResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCreateKeyResponse The RegistrationCreateKeyResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCreateKeyResponse 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 "registrationCreateKeyResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCreateKeyResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCreateKeyResponse for root element {}registrationCreateKeyResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCreateKeyResponse for root element {}registrationCreateKeyResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCreateKeyResponse. 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 "registrationKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}registrationKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}registrationKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRegistrationKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self registrationKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "registrationKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}registrationKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}registrationKey...");
#endif
    [[self registrationKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}registrationKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}registrationKey."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationCreateKeyResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCreateKeyResponse_M */
#ifndef DEF_MYSMSAPINS0RegistrationCheckMsisdnResponse_M
#define DEF_MYSMSAPINS0RegistrationCheckMsisdnResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationCheckMsisdnResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationCheckMsisdnResponse *_mYSMSAPINS0RegistrationCheckMsisdnResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationCheckMsisdnResponse = (MYSMSAPINS0RegistrationCheckMsisdnResponse *) [MYSMSAPINS0RegistrationCheckMsisdnResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationCheckMsisdnResponse;
}

//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 MYSMSAPINS0RegistrationCheckMsisdnResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationCheckMsisdnResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationCheckMsisdnResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationCheckMsisdnResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationCheckMsisdnResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationCheckMsisdnResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationCheckMsisdnResponse *_mYSMSAPINS0RegistrationCheckMsisdnResponse = [[MYSMSAPINS0RegistrationCheckMsisdnResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationCheckMsisdnResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationCheckMsisdnResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationCheckMsisdnResponse autorelease];
  return _mYSMSAPINS0RegistrationCheckMsisdnResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationCheckMsisdnResponse 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 MYSMSAPINS0RegistrationCheckMsisdnResponse 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 MYSMSAPINS0RegistrationCheckMsisdnResponse from an XML reader. The element to be read is
 * "registrationCheckMsisdnResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationCheckMsisdnResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationCheckMsisdnResponse *_registrationCheckMsisdnResponse = 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 registrationCheckMsisdnResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationCheckMsisdnResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationCheckMsisdnResponse.");
#endif
    _registrationCheckMsisdnResponse = (MYSMSAPINS0RegistrationCheckMsisdnResponse *)[MYSMSAPINS0RegistrationCheckMsisdnResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationCheckMsisdnResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCheckMsisdnResponse. Expected element registrationCheckMsisdnResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationCheckMsisdnResponse. Expected element registrationCheckMsisdnResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationCheckMsisdnResponse;
}

/**
 * Writes this MYSMSAPINS0RegistrationCheckMsisdnResponse to XML under element name "registrationCheckMsisdnResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationCheckMsisdnResponse The RegistrationCheckMsisdnResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationCheckMsisdnResponse 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 "registrationCheckMsisdnResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationCheckMsisdnResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationCheckMsisdnResponse for root element {}registrationCheckMsisdnResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationCheckMsisdnResponse for root element {}registrationCheckMsisdnResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationCheckMsisdnResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0RegistrationCheckMsisdnResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationCheckMsisdnResponse_M */
#ifndef DEF_MYSMSAPINS0RegistrationActivateResponse_M
#define DEF_MYSMSAPINS0RegistrationActivateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationActivateResponse

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The user's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The user's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

- (void) dealloc
{
  [self setPassword: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationActivateResponse *_mYSMSAPINS0RegistrationActivateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationActivateResponse = (MYSMSAPINS0RegistrationActivateResponse *) [MYSMSAPINS0RegistrationActivateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationActivateResponse;
}

//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 MYSMSAPINS0RegistrationActivateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationActivateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationActivateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationActivateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationActivateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationActivateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationActivateResponse *_mYSMSAPINS0RegistrationActivateResponse = [[MYSMSAPINS0RegistrationActivateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationActivateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationActivateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationActivateResponse autorelease];
  return _mYSMSAPINS0RegistrationActivateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationActivateResponse 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 MYSMSAPINS0RegistrationActivateResponse 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 MYSMSAPINS0RegistrationActivateResponse from an XML reader. The element to be read is
 * "registrationActivateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationActivateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationActivateResponse *_registrationActivateResponse = 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 registrationActivateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationActivateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationActivateResponse.");
#endif
    _registrationActivateResponse = (MYSMSAPINS0RegistrationActivateResponse *)[MYSMSAPINS0RegistrationActivateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationActivateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateResponse. Expected element registrationActivateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateResponse. Expected element registrationActivateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationActivateResponse;
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateResponse to XML under element name "registrationActivateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationActivateResponse The RegistrationActivateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateResponse 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 "registrationActivateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationActivateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationActivateResponse for root element {}registrationActivateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationActivateResponse for root element {}registrationActivateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationActivateResponse. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationActivateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationActivateResponse_M */
#ifndef DEF_MYSMSAPINS0RegistrationActivateMsisdnResponse_M
#define DEF_MYSMSAPINS0RegistrationActivateMsisdnResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RegistrationActivateMsisdnResponse

/**
 * The user's password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The user's password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

- (void) dealloc
{
  [self setPassword: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RegistrationActivateMsisdnResponse *_mYSMSAPINS0RegistrationActivateMsisdnResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RegistrationActivateMsisdnResponse = (MYSMSAPINS0RegistrationActivateMsisdnResponse *) [MYSMSAPINS0RegistrationActivateMsisdnResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RegistrationActivateMsisdnResponse;
}

//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 MYSMSAPINS0RegistrationActivateMsisdnResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RegistrationActivateMsisdnResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RegistrationActivateMsisdnResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RegistrationActivateMsisdnResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0RegistrationActivateMsisdnResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RegistrationActivateMsisdnResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RegistrationActivateMsisdnResponse *_mYSMSAPINS0RegistrationActivateMsisdnResponse = [[MYSMSAPINS0RegistrationActivateMsisdnResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RegistrationActivateMsisdnResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RegistrationActivateMsisdnResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RegistrationActivateMsisdnResponse autorelease];
  return _mYSMSAPINS0RegistrationActivateMsisdnResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0RegistrationActivateMsisdnResponse 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 MYSMSAPINS0RegistrationActivateMsisdnResponse 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 MYSMSAPINS0RegistrationActivateMsisdnResponse from an XML reader. The element to be read is
 * "registrationActivateMsisdnResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RegistrationActivateMsisdnResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RegistrationActivateMsisdnResponse *_registrationActivateMsisdnResponse = 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 registrationActivateMsisdnResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "registrationActivateMsisdnResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}registrationActivateMsisdnResponse.");
#endif
    _registrationActivateMsisdnResponse = (MYSMSAPINS0RegistrationActivateMsisdnResponse *)[MYSMSAPINS0RegistrationActivateMsisdnResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}registrationActivateMsisdnResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateMsisdnResponse. Expected element registrationActivateMsisdnResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RegistrationActivateMsisdnResponse. Expected element registrationActivateMsisdnResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _registrationActivateMsisdnResponse;
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateMsisdnResponse to XML under element name "registrationActivateMsisdnResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _registrationActivateMsisdnResponse The RegistrationActivateMsisdnResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RegistrationActivateMsisdnResponse 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 "registrationActivateMsisdnResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}registrationActivateMsisdnResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}registrationActivateMsisdnResponse for root element {}registrationActivateMsisdnResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}registrationActivateMsisdnResponse for root element {}registrationActivateMsisdnResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}registrationActivateMsisdnResponse. 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 "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
}
@end /* implementation MYSMSAPINS0RegistrationActivateMsisdnResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0RegistrationActivateMsisdnResponse_M */
#ifndef DEF_MYSMSAPINS0ProUserCheckResponse_M
#define DEF_MYSMSAPINS0ProUserCheckResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ProUserCheckResponse

/**
 * True if the user is a pro user for the requested type
 */
- (BOOL) proUser
{
  return _proUser;
}

/**
 * True if the user is a pro user for the requested type
 */
- (void) setProUser: (BOOL) newProUser
{
  _proUser = newProUser;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ProUserCheckResponse *_mYSMSAPINS0ProUserCheckResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ProUserCheckResponse = (MYSMSAPINS0ProUserCheckResponse *) [MYSMSAPINS0ProUserCheckResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ProUserCheckResponse;
}

//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 MYSMSAPINS0ProUserCheckResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ProUserCheckResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ProUserCheckResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ProUserCheckResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ProUserCheckResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ProUserCheckResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ProUserCheckResponse *_mYSMSAPINS0ProUserCheckResponse = [[MYSMSAPINS0ProUserCheckResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ProUserCheckResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ProUserCheckResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ProUserCheckResponse autorelease];
  return _mYSMSAPINS0ProUserCheckResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ProUserCheckResponse 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 MYSMSAPINS0ProUserCheckResponse 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 MYSMSAPINS0ProUserCheckResponse from an XML reader. The element to be read is
 * "proUserCheckResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ProUserCheckResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ProUserCheckResponse *_proUserCheckResponse = 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 proUserCheckResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "proUserCheckResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}proUserCheckResponse.");
#endif
    _proUserCheckResponse = (MYSMSAPINS0ProUserCheckResponse *)[MYSMSAPINS0ProUserCheckResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}proUserCheckResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserCheckResponse. Expected element proUserCheckResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserCheckResponse. Expected element proUserCheckResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _proUserCheckResponse;
}

/**
 * Writes this MYSMSAPINS0ProUserCheckResponse to XML under element name "proUserCheckResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _proUserCheckResponse The ProUserCheckResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ProUserCheckResponse 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 "proUserCheckResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}proUserCheckResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}proUserCheckResponse for root element {}proUserCheckResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}proUserCheckResponse for root element {}proUserCheckResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}proUserCheckResponse. 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 "proUser", 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 setProUser: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "proUser", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}proUser."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}proUser...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_proUser);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}proUser...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}proUser."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}proUser."];
    }
  }
}
@end /* implementation MYSMSAPINS0ProUserCheckResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ProUserCheckResponse_M */
#ifndef DEF_MYSMSAPINS0ProUserAddResponse_M
#define DEF_MYSMSAPINS0ProUserAddResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ProUserAddResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ProUserAddResponse *_mYSMSAPINS0ProUserAddResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ProUserAddResponse = (MYSMSAPINS0ProUserAddResponse *) [MYSMSAPINS0ProUserAddResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ProUserAddResponse;
}

//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 MYSMSAPINS0ProUserAddResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ProUserAddResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ProUserAddResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ProUserAddResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ProUserAddResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ProUserAddResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ProUserAddResponse *_mYSMSAPINS0ProUserAddResponse = [[MYSMSAPINS0ProUserAddResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ProUserAddResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ProUserAddResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ProUserAddResponse autorelease];
  return _mYSMSAPINS0ProUserAddResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ProUserAddResponse 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 MYSMSAPINS0ProUserAddResponse 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 MYSMSAPINS0ProUserAddResponse from an XML reader. The element to be read is
 * "proUserAddResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ProUserAddResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ProUserAddResponse *_proUserAddResponse = 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 proUserAddResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "proUserAddResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}proUserAddResponse.");
#endif
    _proUserAddResponse = (MYSMSAPINS0ProUserAddResponse *)[MYSMSAPINS0ProUserAddResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}proUserAddResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserAddResponse. Expected element proUserAddResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ProUserAddResponse. Expected element proUserAddResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _proUserAddResponse;
}

/**
 * Writes this MYSMSAPINS0ProUserAddResponse to XML under element name "proUserAddResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _proUserAddResponse The ProUserAddResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ProUserAddResponse 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 "proUserAddResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}proUserAddResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}proUserAddResponse for root element {}proUserAddResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}proUserAddResponse for root element {}proUserAddResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}proUserAddResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0ProUserAddResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ProUserAddResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyStatusResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyStatusResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyStatusResponse

/**
 * Get the status of the verify sms / call<br/>
 * <br/>
 * 0 .. pending <br/>
 * 1 .. delivered / completed <br/>
 * 2 .. undelivered / failed<br/>
 * 3 .. expired / no answer<br/>
 * 4 .. rejected / busy <br/>
 * 5 .. deleted <br/>
 */
- (int) status
{
  return _status;
}

/**
 * Get the status of the verify sms / call<br/>
 * <br/>
 * 0 .. pending <br/>
 * 1 .. delivered / completed <br/>
 * 2 .. undelivered / failed<br/>
 * 3 .. expired / no answer<br/>
 * 4 .. rejected / busy <br/>
 * 5 .. deleted <br/>
 */
- (void) setStatus: (int) newStatus
{
  _status = newStatus;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyStatusResponse *_mYSMSAPINS0MsisdnVerifyStatusResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyStatusResponse = (MYSMSAPINS0MsisdnVerifyStatusResponse *) [MYSMSAPINS0MsisdnVerifyStatusResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyStatusResponse;
}

//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 MYSMSAPINS0MsisdnVerifyStatusResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyStatusResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyStatusResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyStatusResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyStatusResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyStatusResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyStatusResponse *_mYSMSAPINS0MsisdnVerifyStatusResponse = [[MYSMSAPINS0MsisdnVerifyStatusResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyStatusResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyStatusResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyStatusResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyStatusResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyStatusResponse 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 MYSMSAPINS0MsisdnVerifyStatusResponse 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 MYSMSAPINS0MsisdnVerifyStatusResponse from an XML reader. The element to be read is
 * "msisdnVerifyStatusResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyStatusResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyStatusResponse *_msisdnVerifyStatusResponse = 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 msisdnVerifyStatusResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyStatusResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyStatusResponse.");
#endif
    _msisdnVerifyStatusResponse = (MYSMSAPINS0MsisdnVerifyStatusResponse *)[MYSMSAPINS0MsisdnVerifyStatusResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyStatusResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyStatusResponse. Expected element msisdnVerifyStatusResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyStatusResponse. Expected element msisdnVerifyStatusResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyStatusResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyStatusResponse to XML under element name "msisdnVerifyStatusResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyStatusResponse The MsisdnVerifyStatusResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyStatusResponse 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 "msisdnVerifyStatusResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyStatusResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyStatusResponse for root element {}msisdnVerifyStatusResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyStatusResponse for root element {}msisdnVerifyStatusResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyStatusResponse. 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 "status", 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 setStatus: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}status...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_status);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}status...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}status."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}status."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyStatusResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyStatusResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyResponse

/**
 * Get the sender address that was used for the verify sms
 */
- (NSString *) senderAddress
{
  return _senderAddress;
}

/**
 * Get the sender address that was used for the verify sms
 */
- (void) setSenderAddress: (NSString *) newSenderAddress
{
  [newSenderAddress retain];
  [_senderAddress release];
  _senderAddress = newSenderAddress;
}

/**
 * True if the send verify sms was sent as a flash sms
 */
- (BOOL) flashSms
{
  return _flashSms;
}

/**
 * True if the send verify sms was sent as a flash sms
 */
- (void) setFlashSms: (BOOL) newFlashSms
{
  _flashSms = newFlashSms;
}

- (void) dealloc
{
  [self setSenderAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyResponse *_mYSMSAPINS0MsisdnVerifyResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyResponse = (MYSMSAPINS0MsisdnVerifyResponse *) [MYSMSAPINS0MsisdnVerifyResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyResponse;
}

//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 MYSMSAPINS0MsisdnVerifyResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyResponse *_mYSMSAPINS0MsisdnVerifyResponse = [[MYSMSAPINS0MsisdnVerifyResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyResponse 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 MYSMSAPINS0MsisdnVerifyResponse 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 MYSMSAPINS0MsisdnVerifyResponse from an XML reader. The element to be read is
 * "msisdnVerifyResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyResponse *_msisdnVerifyResponse = 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 msisdnVerifyResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyResponse.");
#endif
    _msisdnVerifyResponse = (MYSMSAPINS0MsisdnVerifyResponse *)[MYSMSAPINS0MsisdnVerifyResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyResponse. Expected element msisdnVerifyResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyResponse. Expected element msisdnVerifyResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyResponse to XML under element name "msisdnVerifyResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyResponse The MsisdnVerifyResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyResponse 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 "msisdnVerifyResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyResponse for root element {}msisdnVerifyResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyResponse for root element {}msisdnVerifyResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyResponse. 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 "senderAddress", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}senderAddress of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}senderAddress of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSenderAddress: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "flashSms", 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 setFlashSms: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self senderAddress]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "senderAddress", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}senderAddress."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}senderAddress...");
#endif
    [[self senderAddress] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}senderAddress...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}senderAddress."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "flashSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}flashSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}flashSms...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_flashSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}flashSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}flashSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}flashSms."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCreateKeyResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyCreateKeyResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCreateKeyResponse

/**
 * The newly created key that must be send via SMS to the recipient number
 */
- (NSString *) key
{
  return _key;
}

/**
 * The newly created key that must be send via SMS to the recipient number
 */
- (void) setKey: (NSString *) newKey
{
  [newKey retain];
  [_key release];
  _key = newKey;
}

- (void) dealloc
{
  [self setKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCreateKeyResponse *_mYSMSAPINS0MsisdnVerifyCreateKeyResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCreateKeyResponse = (MYSMSAPINS0MsisdnVerifyCreateKeyResponse *) [MYSMSAPINS0MsisdnVerifyCreateKeyResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCreateKeyResponse;
}

//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 MYSMSAPINS0MsisdnVerifyCreateKeyResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCreateKeyResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCreateKeyResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCreateKeyResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCreateKeyResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCreateKeyResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCreateKeyResponse *_mYSMSAPINS0MsisdnVerifyCreateKeyResponse = [[MYSMSAPINS0MsisdnVerifyCreateKeyResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCreateKeyResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCreateKeyResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCreateKeyResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyCreateKeyResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCreateKeyResponse 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 MYSMSAPINS0MsisdnVerifyCreateKeyResponse 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 MYSMSAPINS0MsisdnVerifyCreateKeyResponse from an XML reader. The element to be read is
 * "msisdnVerifyCreateKeyResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCreateKeyResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCreateKeyResponse *_msisdnVerifyCreateKeyResponse = 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 msisdnVerifyCreateKeyResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCreateKeyResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCreateKeyResponse.");
#endif
    _msisdnVerifyCreateKeyResponse = (MYSMSAPINS0MsisdnVerifyCreateKeyResponse *)[MYSMSAPINS0MsisdnVerifyCreateKeyResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCreateKeyResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCreateKeyResponse. Expected element msisdnVerifyCreateKeyResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCreateKeyResponse. Expected element msisdnVerifyCreateKeyResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCreateKeyResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCreateKeyResponse to XML under element name "msisdnVerifyCreateKeyResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCreateKeyResponse The MsisdnVerifyCreateKeyResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCreateKeyResponse 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 "msisdnVerifyCreateKeyResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCreateKeyResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCreateKeyResponse for root element {}msisdnVerifyCreateKeyResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCreateKeyResponse for root element {}msisdnVerifyCreateKeyResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCreateKeyResponse. 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 "key", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}key of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self key]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "key", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}key."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}key...");
#endif
    [[self key] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}key...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}key."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCreateKeyResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCreateKeyResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCheckPinResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyCheckPinResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckPinResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCheckPinResponse *_mYSMSAPINS0MsisdnVerifyCheckPinResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCheckPinResponse = (MYSMSAPINS0MsisdnVerifyCheckPinResponse *) [MYSMSAPINS0MsisdnVerifyCheckPinResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCheckPinResponse;
}

//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 MYSMSAPINS0MsisdnVerifyCheckPinResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCheckPinResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCheckPinResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckPinResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCheckPinResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCheckPinResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCheckPinResponse *_mYSMSAPINS0MsisdnVerifyCheckPinResponse = [[MYSMSAPINS0MsisdnVerifyCheckPinResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCheckPinResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCheckPinResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCheckPinResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyCheckPinResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCheckPinResponse 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 MYSMSAPINS0MsisdnVerifyCheckPinResponse 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 MYSMSAPINS0MsisdnVerifyCheckPinResponse from an XML reader. The element to be read is
 * "msisdnVerifyCheckPinResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCheckPinResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCheckPinResponse *_msisdnVerifyCheckPinResponse = 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 msisdnVerifyCheckPinResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCheckPinResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCheckPinResponse.");
#endif
    _msisdnVerifyCheckPinResponse = (MYSMSAPINS0MsisdnVerifyCheckPinResponse *)[MYSMSAPINS0MsisdnVerifyCheckPinResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCheckPinResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckPinResponse. Expected element msisdnVerifyCheckPinResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckPinResponse. Expected element msisdnVerifyCheckPinResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCheckPinResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckPinResponse to XML under element name "msisdnVerifyCheckPinResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCheckPinResponse The MsisdnVerifyCheckPinResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckPinResponse 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 "msisdnVerifyCheckPinResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCheckPinResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCheckPinResponse for root element {}msisdnVerifyCheckPinResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCheckPinResponse for root element {}msisdnVerifyCheckPinResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCheckPinResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0MsisdnVerifyCheckPinResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCheckPinResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCheckKeyResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyCheckKeyResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckKeyResponse

/**
 * The mobile number that has send the verify key to our recipient number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The mobile number that has send the verify key to our recipient number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The pin that can be used to create an user or change msisdn
 */
- (int) pin
{
  return _pin;
}

/**
 * The pin that can be used to create an user or change msisdn
 */
- (void) setPin: (int) newPin
{
  _pin = newPin;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCheckKeyResponse *_mYSMSAPINS0MsisdnVerifyCheckKeyResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCheckKeyResponse = (MYSMSAPINS0MsisdnVerifyCheckKeyResponse *) [MYSMSAPINS0MsisdnVerifyCheckKeyResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCheckKeyResponse;
}

//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 MYSMSAPINS0MsisdnVerifyCheckKeyResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCheckKeyResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCheckKeyResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCheckKeyResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCheckKeyResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCheckKeyResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCheckKeyResponse *_mYSMSAPINS0MsisdnVerifyCheckKeyResponse = [[MYSMSAPINS0MsisdnVerifyCheckKeyResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCheckKeyResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCheckKeyResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCheckKeyResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyCheckKeyResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCheckKeyResponse 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 MYSMSAPINS0MsisdnVerifyCheckKeyResponse 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 MYSMSAPINS0MsisdnVerifyCheckKeyResponse from an XML reader. The element to be read is
 * "msisdnVerifyCheckKeyResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCheckKeyResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCheckKeyResponse *_msisdnVerifyCheckKeyResponse = 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 msisdnVerifyCheckKeyResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCheckKeyResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCheckKeyResponse.");
#endif
    _msisdnVerifyCheckKeyResponse = (MYSMSAPINS0MsisdnVerifyCheckKeyResponse *)[MYSMSAPINS0MsisdnVerifyCheckKeyResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCheckKeyResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckKeyResponse. Expected element msisdnVerifyCheckKeyResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCheckKeyResponse. Expected element msisdnVerifyCheckKeyResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCheckKeyResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckKeyResponse to XML under element name "msisdnVerifyCheckKeyResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCheckKeyResponse The MsisdnVerifyCheckKeyResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCheckKeyResponse 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 "msisdnVerifyCheckKeyResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCheckKeyResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCheckKeyResponse for root element {}msisdnVerifyCheckKeyResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCheckKeyResponse for root element {}msisdnVerifyCheckKeyResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCheckKeyResponse. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pin", 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 setPin: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_pin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}pin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pin."];
    }
  }
}
@end /* implementation MYSMSAPINS0MsisdnVerifyCheckKeyResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCheckKeyResponse_M */
#ifndef DEF_MYSMSAPINS0MsisdnVerifyCallResponse_M
#define DEF_MYSMSAPINS0MsisdnVerifyCallResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MsisdnVerifyCallResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MsisdnVerifyCallResponse *_mYSMSAPINS0MsisdnVerifyCallResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MsisdnVerifyCallResponse = (MYSMSAPINS0MsisdnVerifyCallResponse *) [MYSMSAPINS0MsisdnVerifyCallResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MsisdnVerifyCallResponse;
}

//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 MYSMSAPINS0MsisdnVerifyCallResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MsisdnVerifyCallResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MsisdnVerifyCallResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MsisdnVerifyCallResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MsisdnVerifyCallResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MsisdnVerifyCallResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MsisdnVerifyCallResponse *_mYSMSAPINS0MsisdnVerifyCallResponse = [[MYSMSAPINS0MsisdnVerifyCallResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MsisdnVerifyCallResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MsisdnVerifyCallResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MsisdnVerifyCallResponse autorelease];
  return _mYSMSAPINS0MsisdnVerifyCallResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MsisdnVerifyCallResponse 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 MYSMSAPINS0MsisdnVerifyCallResponse 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 MYSMSAPINS0MsisdnVerifyCallResponse from an XML reader. The element to be read is
 * "msisdnVerifyCallResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MsisdnVerifyCallResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MsisdnVerifyCallResponse *_msisdnVerifyCallResponse = 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 msisdnVerifyCallResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "msisdnVerifyCallResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}msisdnVerifyCallResponse.");
#endif
    _msisdnVerifyCallResponse = (MYSMSAPINS0MsisdnVerifyCallResponse *)[MYSMSAPINS0MsisdnVerifyCallResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}msisdnVerifyCallResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCallResponse. Expected element msisdnVerifyCallResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MsisdnVerifyCallResponse. Expected element msisdnVerifyCallResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _msisdnVerifyCallResponse;
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCallResponse to XML under element name "msisdnVerifyCallResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _msisdnVerifyCallResponse The MsisdnVerifyCallResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MsisdnVerifyCallResponse 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 "msisdnVerifyCallResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}msisdnVerifyCallResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}msisdnVerifyCallResponse for root element {}msisdnVerifyCallResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}msisdnVerifyCallResponse for root element {}msisdnVerifyCallResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}msisdnVerifyCallResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0MsisdnVerifyCallResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MsisdnVerifyCallResponse_M */
#ifndef DEF_MYSMSAPINS0MessageSendResponse_M
#define DEF_MYSMSAPINS0MessageSendResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0MessageSendResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0MessageSendResponse *_mYSMSAPINS0MessageSendResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0MessageSendResponse = (MYSMSAPINS0MessageSendResponse *) [MYSMSAPINS0MessageSendResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0MessageSendResponse;
}

//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 MYSMSAPINS0MessageSendResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0MessageSendResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0MessageSendResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0MessageSendResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0MessageSendResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0MessageSendResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0MessageSendResponse *_mYSMSAPINS0MessageSendResponse = [[MYSMSAPINS0MessageSendResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0MessageSendResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0MessageSendResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0MessageSendResponse autorelease];
  return _mYSMSAPINS0MessageSendResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0MessageSendResponse 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 MYSMSAPINS0MessageSendResponse 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 MYSMSAPINS0MessageSendResponse from an XML reader. The element to be read is
 * "messageSendResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0MessageSendResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0MessageSendResponse *_messageSendResponse = 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 messageSendResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "messageSendResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}messageSendResponse.");
#endif
    _messageSendResponse = (MYSMSAPINS0MessageSendResponse *)[MYSMSAPINS0MessageSendResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}messageSendResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MessageSendResponse. Expected element messageSendResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0MessageSendResponse. Expected element messageSendResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _messageSendResponse;
}

/**
 * Writes this MYSMSAPINS0MessageSendResponse to XML under element name "messageSendResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _messageSendResponse The MessageSendResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0MessageSendResponse 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 "messageSendResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}messageSendResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}messageSendResponse for root element {}messageSendResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}messageSendResponse for root element {}messageSendResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}messageSendResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0MessageSendResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0MessageSendResponse_M */
#ifndef DEF_MYSMSAPINS0GroupSendMessageResponse_M
#define DEF_MYSMSAPINS0GroupSendMessageResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupSendMessageResponse

/**
 * The (server) message id of newly created outgoing message.
 * 
 * The message will be synchronized with the next message sync.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The (server) message id of newly created outgoing message.
 * 
 * The message will be synchronized with the next message sync.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

- (void) dealloc
{
  [self setDateSent: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupSendMessageResponse *_mYSMSAPINS0GroupSendMessageResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupSendMessageResponse = (MYSMSAPINS0GroupSendMessageResponse *) [MYSMSAPINS0GroupSendMessageResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupSendMessageResponse;
}

//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 MYSMSAPINS0GroupSendMessageResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupSendMessageResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupSendMessageResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupSendMessageResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupSendMessageResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupSendMessageResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupSendMessageResponse *_mYSMSAPINS0GroupSendMessageResponse = [[MYSMSAPINS0GroupSendMessageResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupSendMessageResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupSendMessageResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupSendMessageResponse autorelease];
  return _mYSMSAPINS0GroupSendMessageResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupSendMessageResponse 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 MYSMSAPINS0GroupSendMessageResponse 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 MYSMSAPINS0GroupSendMessageResponse from an XML reader. The element to be read is
 * "groupSendMessageResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupSendMessageResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupSendMessageResponse *_groupSendMessageResponse = 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 groupSendMessageResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupSendMessageResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupSendMessageResponse.");
#endif
    _groupSendMessageResponse = (MYSMSAPINS0GroupSendMessageResponse *)[MYSMSAPINS0GroupSendMessageResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupSendMessageResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupSendMessageResponse. Expected element groupSendMessageResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupSendMessageResponse. Expected element groupSendMessageResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupSendMessageResponse;
}

/**
 * Writes this MYSMSAPINS0GroupSendMessageResponse to XML under element name "groupSendMessageResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupSendMessageResponse The GroupSendMessageResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupSendMessageResponse 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 "groupSendMessageResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupSendMessageResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupSendMessageResponse for root element {}groupSendMessageResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupSendMessageResponse for root element {}groupSendMessageResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupSendMessageResponse. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSent: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
  if ([self dateSent]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSent...");
#endif
    [[self dateSent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSent...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSent."];
    }
  }
}
@end /* implementation MYSMSAPINS0GroupSendMessageResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupSendMessageResponse_M */
#ifndef DEF_MYSMSAPINS0FeedbackSendRequest_M
#define DEF_MYSMSAPINS0FeedbackSendRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0FeedbackSendRequest

/**
 * The feedback's category
 */
- (NSString *) category
{
  return _category;
}

/**
 * The feedback's category
 */
- (void) setCategory: (NSString *) newCategory
{
  [newCategory retain];
  [_category release];
  _category = newCategory;
}

/**
 * The feedback's message
 */
- (NSString *) message
{
  return _message;
}

/**
 * The feedback's message
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

- (void) dealloc
{
  [self setCategory: nil];
  [self setMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0FeedbackSendRequest *_mYSMSAPINS0FeedbackSendRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0FeedbackSendRequest = (MYSMSAPINS0FeedbackSendRequest *) [MYSMSAPINS0FeedbackSendRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0FeedbackSendRequest;
}

//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 MYSMSAPINS0FeedbackSendRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0FeedbackSendRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0FeedbackSendRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0FeedbackSendRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0FeedbackSendRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0FeedbackSendRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0FeedbackSendRequest *_mYSMSAPINS0FeedbackSendRequest = [[MYSMSAPINS0FeedbackSendRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0FeedbackSendRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0FeedbackSendRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0FeedbackSendRequest autorelease];
  return _mYSMSAPINS0FeedbackSendRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0FeedbackSendRequest 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 MYSMSAPINS0FeedbackSendRequest 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 MYSMSAPINS0FeedbackSendRequest from an XML reader. The element to be read is
 * "feedbackSendRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0FeedbackSendRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0FeedbackSendRequest *_feedbackSendRequest = 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 feedbackSendRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "feedbackSendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}feedbackSendRequest.");
#endif
    _feedbackSendRequest = (MYSMSAPINS0FeedbackSendRequest *)[MYSMSAPINS0FeedbackSendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}feedbackSendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0FeedbackSendRequest. Expected element feedbackSendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0FeedbackSendRequest. Expected element feedbackSendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _feedbackSendRequest;
}

/**
 * Writes this MYSMSAPINS0FeedbackSendRequest to XML under element name "feedbackSendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _feedbackSendRequest The FeedbackSendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0FeedbackSendRequest 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 "feedbackSendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}feedbackSendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}feedbackSendRequest for root element {}feedbackSendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}feedbackSendRequest for root element {}feedbackSendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}feedbackSendRequest. 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 "category", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}category of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}category of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setCategory: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self category]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "category", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}category."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}category...");
#endif
    [[self category] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}category...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}category."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
}
@end /* implementation MYSMSAPINS0FeedbackSendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0FeedbackSendRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountValidateRequest_M
#define DEF_MYSMSAPINS0ExternalAccountValidateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountValidateRequest

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth token which was returned after visiting the oauth authorization url
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The oauth token which was returned after visiting the oauth authorization url
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

/**
 * The oauth verifier which was returned after visiting the oauth authorization url
 */
- (NSString *) oauthVerifier
{
  return _oauthVerifier;
}

/**
 * The oauth verifier which was returned after visiting the oauth authorization url
 */
- (void) setOauthVerifier: (NSString *) newOauthVerifier
{
  [newOauthVerifier retain];
  [_oauthVerifier release];
  _oauthVerifier = newOauthVerifier;
}

- (void) dealloc
{
  [self setOauthToken: nil];
  [self setOauthVerifier: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountValidateRequest *_mYSMSAPINS0ExternalAccountValidateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountValidateRequest = (MYSMSAPINS0ExternalAccountValidateRequest *) [MYSMSAPINS0ExternalAccountValidateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountValidateRequest;
}

//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 MYSMSAPINS0ExternalAccountValidateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountValidateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountValidateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountValidateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountValidateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountValidateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountValidateRequest *_mYSMSAPINS0ExternalAccountValidateRequest = [[MYSMSAPINS0ExternalAccountValidateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountValidateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountValidateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountValidateRequest autorelease];
  return _mYSMSAPINS0ExternalAccountValidateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountValidateRequest 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 MYSMSAPINS0ExternalAccountValidateRequest 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 MYSMSAPINS0ExternalAccountValidateRequest from an XML reader. The element to be read is
 * "externalAccountValidateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountValidateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountValidateRequest *_externalAccountValidateRequest = 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 externalAccountValidateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountValidateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountValidateRequest.");
#endif
    _externalAccountValidateRequest = (MYSMSAPINS0ExternalAccountValidateRequest *)[MYSMSAPINS0ExternalAccountValidateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountValidateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountValidateRequest. Expected element externalAccountValidateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountValidateRequest. Expected element externalAccountValidateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountValidateRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountValidateRequest to XML under element name "externalAccountValidateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountValidateRequest The ExternalAccountValidateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountValidateRequest 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 "externalAccountValidateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountValidateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountValidateRequest for root element {}externalAccountValidateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountValidateRequest for root element {}externalAccountValidateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountValidateRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthToken: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthVerifier", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthVerifier of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthVerifier of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthVerifier: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthToken...");
#endif
    [[self oauthToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthToken."];
    }
  }
  if ([self oauthVerifier]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthVerifier", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthVerifier."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthVerifier...");
#endif
    [[self oauthVerifier] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthVerifier...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthVerifier."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountValidateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountValidateRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountLoginRequest_M
#define DEF_MYSMSAPINS0ExternalAccountLoginRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountLoginRequest

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth token of the external account
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The oauth token of the external account
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

/**
 * The optional language code for the info mail that is send if the account is not connected.
 * <p/>
 * If null no info mail is sent.
 */
- (NSString *) languageCode
{
  return _languageCode;
}

/**
 * The optional language code for the info mail that is send if the account is not connected.
 * <p/>
 * If null no info mail is sent.
 */
- (void) setLanguageCode: (NSString *) newLanguageCode
{
  [newLanguageCode retain];
  [_languageCode release];
  _languageCode = newLanguageCode;
}

- (void) dealloc
{
  [self setOauthToken: nil];
  [self setLanguageCode: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountLoginRequest *_mYSMSAPINS0ExternalAccountLoginRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountLoginRequest = (MYSMSAPINS0ExternalAccountLoginRequest *) [MYSMSAPINS0ExternalAccountLoginRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountLoginRequest;
}

//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 MYSMSAPINS0ExternalAccountLoginRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountLoginRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountLoginRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountLoginRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountLoginRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountLoginRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountLoginRequest *_mYSMSAPINS0ExternalAccountLoginRequest = [[MYSMSAPINS0ExternalAccountLoginRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountLoginRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountLoginRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountLoginRequest autorelease];
  return _mYSMSAPINS0ExternalAccountLoginRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountLoginRequest 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 MYSMSAPINS0ExternalAccountLoginRequest 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 MYSMSAPINS0ExternalAccountLoginRequest from an XML reader. The element to be read is
 * "externalAccountLoginRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountLoginRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountLoginRequest *_externalAccountLoginRequest = 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 externalAccountLoginRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountLoginRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountLoginRequest.");
#endif
    _externalAccountLoginRequest = (MYSMSAPINS0ExternalAccountLoginRequest *)[MYSMSAPINS0ExternalAccountLoginRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountLoginRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountLoginRequest. Expected element externalAccountLoginRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountLoginRequest. Expected element externalAccountLoginRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountLoginRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountLoginRequest to XML under element name "externalAccountLoginRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountLoginRequest The ExternalAccountLoginRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountLoginRequest 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 "externalAccountLoginRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountLoginRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountLoginRequest for root element {}externalAccountLoginRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountLoginRequest for root element {}externalAccountLoginRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountLoginRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthToken: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "languageCode", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}languageCode of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setLanguageCode: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthToken...");
#endif
    [[self oauthToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthToken."];
    }
  }
  if ([self languageCode]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "languageCode", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}languageCode."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}languageCode...");
#endif
    [[self languageCode] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}languageCode...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}languageCode."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountLoginRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountLoginRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountInitiateRequest_M
#define DEF_MYSMSAPINS0ExternalAccountInitiateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountInitiateRequest

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth callback url for the ongoing oauth login
 */
- (NSString *) oauthCallbackUrl
{
  return _oauthCallbackUrl;
}

/**
 * The oauth callback url for the ongoing oauth login
 */
- (void) setOauthCallbackUrl: (NSString *) newOauthCallbackUrl
{
  [newOauthCallbackUrl retain];
  [_oauthCallbackUrl release];
  _oauthCallbackUrl = newOauthCallbackUrl;
}

- (void) dealloc
{
  [self setOauthCallbackUrl: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountInitiateRequest *_mYSMSAPINS0ExternalAccountInitiateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountInitiateRequest = (MYSMSAPINS0ExternalAccountInitiateRequest *) [MYSMSAPINS0ExternalAccountInitiateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountInitiateRequest;
}

//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 MYSMSAPINS0ExternalAccountInitiateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountInitiateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountInitiateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountInitiateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountInitiateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountInitiateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountInitiateRequest *_mYSMSAPINS0ExternalAccountInitiateRequest = [[MYSMSAPINS0ExternalAccountInitiateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountInitiateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountInitiateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountInitiateRequest autorelease];
  return _mYSMSAPINS0ExternalAccountInitiateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountInitiateRequest 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 MYSMSAPINS0ExternalAccountInitiateRequest 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 MYSMSAPINS0ExternalAccountInitiateRequest from an XML reader. The element to be read is
 * "externalAccountInitiateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountInitiateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountInitiateRequest *_externalAccountInitiateRequest = 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 externalAccountInitiateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountInitiateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountInitiateRequest.");
#endif
    _externalAccountInitiateRequest = (MYSMSAPINS0ExternalAccountInitiateRequest *)[MYSMSAPINS0ExternalAccountInitiateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountInitiateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountInitiateRequest. Expected element externalAccountInitiateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountInitiateRequest. Expected element externalAccountInitiateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountInitiateRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountInitiateRequest to XML under element name "externalAccountInitiateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountInitiateRequest The ExternalAccountInitiateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountInitiateRequest 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 "externalAccountInitiateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountInitiateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountInitiateRequest for root element {}externalAccountInitiateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountInitiateRequest for root element {}externalAccountInitiateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountInitiateRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthCallbackUrl", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthCallbackUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthCallbackUrl of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthCallbackUrl: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthCallbackUrl]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthCallbackUrl", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthCallbackUrl."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthCallbackUrl...");
#endif
    [[self oauthCallbackUrl] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthCallbackUrl...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthCallbackUrl."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountInitiateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountInitiateRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountDisconnectRequest_M
#define DEF_MYSMSAPINS0ExternalAccountDisconnectRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountDisconnectRequest

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth token of the external account
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The oauth token of the external account
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

- (void) dealloc
{
  [self setOauthToken: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountDisconnectRequest *_mYSMSAPINS0ExternalAccountDisconnectRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountDisconnectRequest = (MYSMSAPINS0ExternalAccountDisconnectRequest *) [MYSMSAPINS0ExternalAccountDisconnectRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountDisconnectRequest;
}

//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 MYSMSAPINS0ExternalAccountDisconnectRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountDisconnectRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountDisconnectRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountDisconnectRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountDisconnectRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountDisconnectRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountDisconnectRequest *_mYSMSAPINS0ExternalAccountDisconnectRequest = [[MYSMSAPINS0ExternalAccountDisconnectRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountDisconnectRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountDisconnectRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountDisconnectRequest autorelease];
  return _mYSMSAPINS0ExternalAccountDisconnectRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountDisconnectRequest 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 MYSMSAPINS0ExternalAccountDisconnectRequest 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 MYSMSAPINS0ExternalAccountDisconnectRequest from an XML reader. The element to be read is
 * "externalAccountDisconnectRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountDisconnectRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountDisconnectRequest *_externalAccountDisconnectRequest = 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 externalAccountDisconnectRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountDisconnectRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountDisconnectRequest.");
#endif
    _externalAccountDisconnectRequest = (MYSMSAPINS0ExternalAccountDisconnectRequest *)[MYSMSAPINS0ExternalAccountDisconnectRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountDisconnectRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountDisconnectRequest. Expected element externalAccountDisconnectRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountDisconnectRequest. Expected element externalAccountDisconnectRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountDisconnectRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountDisconnectRequest to XML under element name "externalAccountDisconnectRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountDisconnectRequest The ExternalAccountDisconnectRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountDisconnectRequest 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 "externalAccountDisconnectRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountDisconnectRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountDisconnectRequest for root element {}externalAccountDisconnectRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountDisconnectRequest for root element {}externalAccountDisconnectRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountDisconnectRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthToken...");
#endif
    [[self oauthToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthToken."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountDisconnectRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountDisconnectRequest_M */
#ifndef DEF_MYSMSAPINS0ConfigGetProductsResponse_M
#define DEF_MYSMSAPINS0ConfigGetProductsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ConfigGetProductsResponse

/**
 * (no documentation provided)
 */
- (NSArray *) products
{
  return _products;
}

/**
 * (no documentation provided)
 */
- (void) setProducts: (NSArray *) newProducts
{
  [newProducts retain];
  [_products release];
  _products = newProducts;
}

- (void) dealloc
{
  [self setProducts: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ConfigGetProductsResponse *_mYSMSAPINS0ConfigGetProductsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ConfigGetProductsResponse = (MYSMSAPINS0ConfigGetProductsResponse *) [MYSMSAPINS0ConfigGetProductsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ConfigGetProductsResponse;
}

//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 MYSMSAPINS0ConfigGetProductsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ConfigGetProductsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ConfigGetProductsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ConfigGetProductsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ConfigGetProductsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ConfigGetProductsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ConfigGetProductsResponse *_mYSMSAPINS0ConfigGetProductsResponse = [[MYSMSAPINS0ConfigGetProductsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ConfigGetProductsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ConfigGetProductsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ConfigGetProductsResponse autorelease];
  return _mYSMSAPINS0ConfigGetProductsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ConfigGetProductsResponse 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 MYSMSAPINS0ConfigGetProductsResponse 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 MYSMSAPINS0ConfigGetProductsResponse from an XML reader. The element to be read is
 * "configGetProductsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ConfigGetProductsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ConfigGetProductsResponse *_configGetProductsResponse = 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 configGetProductsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "configGetProductsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}configGetProductsResponse.");
#endif
    _configGetProductsResponse = (MYSMSAPINS0ConfigGetProductsResponse *)[MYSMSAPINS0ConfigGetProductsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}configGetProductsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ConfigGetProductsResponse. Expected element configGetProductsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ConfigGetProductsResponse. Expected element configGetProductsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _configGetProductsResponse;
}

/**
 * Writes this MYSMSAPINS0ConfigGetProductsResponse to XML under element name "configGetProductsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _configGetProductsResponse The ConfigGetProductsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ConfigGetProductsResponse 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 "configGetProductsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}configGetProductsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}configGetProductsResponse for root element {}configGetProductsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}configGetProductsResponse for root element {}configGetProductsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}configGetProductsResponse. 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 "products", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}products of type {}configProduct.");
#endif

     __child = [MYSMSAPINS0ConfigProduct readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}products of type {}configProduct.");
#endif

    if ([self products]) {
      [self setProducts: [[self products] arrayByAddingObject: __child]];
    }
    else {
      [self setProducts: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self products]) {
    __enumerator = [[self products] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "products", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}products."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}products...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}products...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}products."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0ConfigGetProductsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ConfigGetProductsResponse_M */
#ifndef DEF_MYSMSAPINS0AttachmentUploadedPartResponse_M
#define DEF_MYSMSAPINS0AttachmentUploadedPartResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentUploadedPartResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentUploadedPartResponse *_mYSMSAPINS0AttachmentUploadedPartResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentUploadedPartResponse = (MYSMSAPINS0AttachmentUploadedPartResponse *) [MYSMSAPINS0AttachmentUploadedPartResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentUploadedPartResponse;
}

//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 MYSMSAPINS0AttachmentUploadedPartResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentUploadedPartResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentUploadedPartResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentUploadedPartResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentUploadedPartResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentUploadedPartResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentUploadedPartResponse *_mYSMSAPINS0AttachmentUploadedPartResponse = [[MYSMSAPINS0AttachmentUploadedPartResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentUploadedPartResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentUploadedPartResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentUploadedPartResponse autorelease];
  return _mYSMSAPINS0AttachmentUploadedPartResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentUploadedPartResponse 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 MYSMSAPINS0AttachmentUploadedPartResponse 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 MYSMSAPINS0AttachmentUploadedPartResponse from an XML reader. The element to be read is
 * "attachmentUploadedPartResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentUploadedPartResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentUploadedPartResponse *_attachmentUploadedPartResponse = 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 attachmentUploadedPartResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentUploadedPartResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentUploadedPartResponse.");
#endif
    _attachmentUploadedPartResponse = (MYSMSAPINS0AttachmentUploadedPartResponse *)[MYSMSAPINS0AttachmentUploadedPartResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentUploadedPartResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentUploadedPartResponse. Expected element attachmentUploadedPartResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentUploadedPartResponse. Expected element attachmentUploadedPartResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentUploadedPartResponse;
}

/**
 * Writes this MYSMSAPINS0AttachmentUploadedPartResponse to XML under element name "attachmentUploadedPartResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentUploadedPartResponse The AttachmentUploadedPartResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentUploadedPartResponse 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 "attachmentUploadedPartResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentUploadedPartResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentUploadedPartResponse for root element {}attachmentUploadedPartResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentUploadedPartResponse for root element {}attachmentUploadedPartResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentUploadedPartResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0AttachmentUploadedPartResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentUploadedPartResponse_M */
#ifndef DEF_MYSMSAPINS0AttachmentGetPartsResponse_M
#define DEF_MYSMSAPINS0AttachmentGetPartsResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentGetPartsResponse

/**
 * The list of user message conversations.
 */
- (NSArray *) parts
{
  return _parts;
}

/**
 * The list of user message conversations.
 */
- (void) setParts: (NSArray *) newParts
{
  [newParts retain];
  [_parts release];
  _parts = newParts;
}

- (void) dealloc
{
  [self setParts: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentGetPartsResponse *_mYSMSAPINS0AttachmentGetPartsResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentGetPartsResponse = (MYSMSAPINS0AttachmentGetPartsResponse *) [MYSMSAPINS0AttachmentGetPartsResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentGetPartsResponse;
}

//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 MYSMSAPINS0AttachmentGetPartsResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentGetPartsResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentGetPartsResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentGetPartsResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentGetPartsResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentGetPartsResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentGetPartsResponse *_mYSMSAPINS0AttachmentGetPartsResponse = [[MYSMSAPINS0AttachmentGetPartsResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentGetPartsResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentGetPartsResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentGetPartsResponse autorelease];
  return _mYSMSAPINS0AttachmentGetPartsResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentGetPartsResponse 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 MYSMSAPINS0AttachmentGetPartsResponse 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 MYSMSAPINS0AttachmentGetPartsResponse from an XML reader. The element to be read is
 * "attachmentGetPartsResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentGetPartsResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentGetPartsResponse *_attachmentGetPartsResponse = 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 attachmentGetPartsResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentGetPartsResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentGetPartsResponse.");
#endif
    _attachmentGetPartsResponse = (MYSMSAPINS0AttachmentGetPartsResponse *)[MYSMSAPINS0AttachmentGetPartsResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentGetPartsResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentGetPartsResponse. Expected element attachmentGetPartsResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentGetPartsResponse. Expected element attachmentGetPartsResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentGetPartsResponse;
}

/**
 * Writes this MYSMSAPINS0AttachmentGetPartsResponse to XML under element name "attachmentGetPartsResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentGetPartsResponse The AttachmentGetPartsResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentGetPartsResponse 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 "attachmentGetPartsResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentGetPartsResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentGetPartsResponse for root element {}attachmentGetPartsResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentGetPartsResponse for root element {}attachmentGetPartsResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentGetPartsResponse. 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 "parts", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}parts of type {}attachmentPart.");
#endif

     __child = [MYSMSAPINS0AttachmentPart readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}parts of type {}attachmentPart.");
#endif

    if ([self parts]) {
      [self setParts: [[self parts] arrayByAddingObject: __child]];
    }
    else {
      [self setParts: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self parts]) {
    __enumerator = [[self parts] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "parts", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}parts."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}parts...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}parts...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}parts."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0AttachmentGetPartsResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentGetPartsResponse_M */
#ifndef DEF_MYSMSAPINS0AttachmentAddPartResponse_M
#define DEF_MYSMSAPINS0AttachmentAddPartResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentAddPartResponse

/**
 * The newly created part id of the attachment.
 */
- (int) partId
{
  return _partId;
}

/**
 * The newly created part id of the attachment.
 */
- (void) setPartId: (int) newPartId
{
  _partId = newPartId;
}

/**
 * The download url of the attachment part.
 */
- (NSString *) url
{
  return _url;
}

/**
 * The download url of the attachment part.
 */
- (void) setUrl: (NSString *) newUrl
{
  [newUrl retain];
  [_url release];
  _url = newUrl;
}

/**
 * Gets the amazon s3 upload info
 */
- (MYSMSAPINS0AmazonS3Upload *) amazonS3Upload
{
  return _amazonS3Upload;
}

/**
 * Gets the amazon s3 upload info
 */
- (void) setAmazonS3Upload: (MYSMSAPINS0AmazonS3Upload *) newAmazonS3Upload
{
  [newAmazonS3Upload retain];
  [_amazonS3Upload release];
  _amazonS3Upload = newAmazonS3Upload;
}

/**
 * Gets the preview amazon s3 upload info
 * 
 * If their is no preview it will be null
 */
- (MYSMSAPINS0AmazonS3Upload *) previewAmazonS3Upload
{
  return _previewAmazonS3Upload;
}

/**
 * Gets the preview amazon s3 upload info
 * 
 * If their is no preview it will be null
 */
- (void) setPreviewAmazonS3Upload: (MYSMSAPINS0AmazonS3Upload *) newPreviewAmazonS3Upload
{
  [newPreviewAmazonS3Upload retain];
  [_previewAmazonS3Upload release];
  _previewAmazonS3Upload = newPreviewAmazonS3Upload;
}

- (void) dealloc
{
  [self setUrl: nil];
  [self setAmazonS3Upload: nil];
  [self setPreviewAmazonS3Upload: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentAddPartResponse *_mYSMSAPINS0AttachmentAddPartResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentAddPartResponse = (MYSMSAPINS0AttachmentAddPartResponse *) [MYSMSAPINS0AttachmentAddPartResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentAddPartResponse;
}

//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 MYSMSAPINS0AttachmentAddPartResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentAddPartResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentAddPartResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentAddPartResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentAddPartResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentAddPartResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentAddPartResponse *_mYSMSAPINS0AttachmentAddPartResponse = [[MYSMSAPINS0AttachmentAddPartResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentAddPartResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentAddPartResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentAddPartResponse autorelease];
  return _mYSMSAPINS0AttachmentAddPartResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentAddPartResponse 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 MYSMSAPINS0AttachmentAddPartResponse 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 MYSMSAPINS0AttachmentAddPartResponse from an XML reader. The element to be read is
 * "attachmentAddPartResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentAddPartResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentAddPartResponse *_attachmentAddPartResponse = 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 attachmentAddPartResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentAddPartResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentAddPartResponse.");
#endif
    _attachmentAddPartResponse = (MYSMSAPINS0AttachmentAddPartResponse *)[MYSMSAPINS0AttachmentAddPartResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentAddPartResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAddPartResponse. Expected element attachmentAddPartResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAddPartResponse. Expected element attachmentAddPartResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentAddPartResponse;
}

/**
 * Writes this MYSMSAPINS0AttachmentAddPartResponse to XML under element name "attachmentAddPartResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentAddPartResponse The AttachmentAddPartResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentAddPartResponse 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 "attachmentAddPartResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentAddPartResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentAddPartResponse for root element {}attachmentAddPartResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentAddPartResponse for root element {}attachmentAddPartResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentAddPartResponse. 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 "partId", 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 setPartId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "url", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}url of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}url of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setUrl: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "amazonS3Upload", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}amazonS3Upload of type {}amazonS3Upload.");
#endif
    __child = [MYSMSAPINS0AmazonS3Upload readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}amazonS3Upload of type {}amazonS3Upload.");
#endif

    [self setAmazonS3Upload: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "previewAmazonS3Upload", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}previewAmazonS3Upload of type {}amazonS3Upload.");
#endif
    __child = [MYSMSAPINS0AmazonS3Upload readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}previewAmazonS3Upload of type {}amazonS3Upload.");
#endif

    [self setPreviewAmazonS3Upload: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "partId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}partId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}partId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_partId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}partId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}partId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}partId."];
    }
  }
  if ([self url]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "url", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}url."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}url...");
#endif
    [[self url] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}url...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}url."];
    }
  }
  if ([self amazonS3Upload]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "amazonS3Upload", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}amazonS3Upload."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}amazonS3Upload...");
#endif
    [[self amazonS3Upload] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}amazonS3Upload...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}amazonS3Upload."];
    }
  }
  if ([self previewAmazonS3Upload]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "previewAmazonS3Upload", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}previewAmazonS3Upload."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}previewAmazonS3Upload...");
#endif
    [[self previewAmazonS3Upload] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}previewAmazonS3Upload...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}previewAmazonS3Upload."];
    }
  }
}
@end /* implementation MYSMSAPINS0AttachmentAddPartResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentAddPartResponse_M */
#ifndef DEF_MYSMSAPINS0AuthRequest_M
#define DEF_MYSMSAPINS0AuthRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AuthRequest

/**
 * The authentication token returned by the user login request
 */
- (NSString *) authToken
{
  return _authToken;
}

/**
 * The authentication token returned by the user login request
 */
- (void) setAuthToken: (NSString *) newAuthToken
{
  [newAuthToken retain];
  [_authToken release];
  _authToken = newAuthToken;
}

- (void) dealloc
{
  [self setAuthToken: nil];
  [super dealloc];
}
@end /* implementation MYSMSAPINS0AuthRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AuthRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType>

@end /*interface MYSMSAPINS0AuthRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AuthRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AuthRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AuthRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AuthRequest *_mYSMSAPINS0AuthRequest = [[MYSMSAPINS0AuthRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AuthRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AuthRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AuthRequest autorelease];
  return _mYSMSAPINS0AuthRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AuthRequest 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 MYSMSAPINS0AuthRequest 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];
}

//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 "authToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}authToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}authToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAuthToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self authToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "authToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}authToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}authToken...");
#endif
    [[self authToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}authToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}authToken."];
    }
  }
}
@end /* implementation MYSMSAPINS0AuthRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AuthRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsSentRequest_M
#define DEF_MYSMSAPINS0RemoteSmsSentRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsSentRequest

/**
 * The remote sms send request id.
 */
- (long long) requestId
{
  return _requestId;
}

/**
 * The remote sms send request id.
 */
- (void) setRequestId: (long long) newRequestId
{
  _requestId = newRequestId;
}

/**
 * The registered device id for the device.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * The device message id of the message
 */
- (int) deviceMessageId
{
  return _deviceMessageId;
}

/**
 * The device message id of the message
 */
- (void) setDeviceMessageId: (int) newDeviceMessageId
{
  _deviceMessageId = newDeviceMessageId;
}

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The message body
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message body
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The origin of the message
 * <br/>
 * 0 .. sim<br/>
 * 1 .. mysms<br/>
 * 2 .. a2a<br/>
 * or a sms connector id<br/>
 */
- (int) origin
{
  return _origin;
}

/**
 * The origin of the message
 * <br/>
 * 0 .. sim<br/>
 * 1 .. mysms<br/>
 * 2 .. a2a<br/>
 * or a sms connector id<br/>
 */
- (void) setOrigin: (int) newOrigin
{
  _origin = newOrigin;
}

/**
 * The status of the message
 * <br/>
 * 0 .. none<br/>
 * 1 .. complete<br/>
 * 2 .. pending<br/>
 * 3 .. failed<br/>
 */
- (int *) status
{
  return _status;
}

/**
 * The status of the message
 * <br/>
 * 0 .. none<br/>
 * 1 .. complete<br/>
 * 2 .. pending<br/>
 * 3 .. failed<br/>
 */
- (void) setStatus: (int *) newStatus
{
  if (_status != NULL) {
    free(_status);
  }
  _status = newStatus;
}

/**
 * The date when the message was sent
 */
- (NSDate *) dateSent
{
  return _dateSent;
}

/**
 * The date when the message was sent
 */
- (void) setDateSent: (NSDate *) newDateSent
{
  [newDateSent retain];
  [_dateSent release];
  _dateSent = newDateSent;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setMessage: nil];
  [self setStatus: NULL];
  [self setDateSent: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsSentRequest *_mYSMSAPINS0RemoteSmsSentRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsSentRequest = (MYSMSAPINS0RemoteSmsSentRequest *) [MYSMSAPINS0RemoteSmsSentRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsSentRequest;
}

//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 MYSMSAPINS0RemoteSmsSentRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsSentRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsSentRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsSentRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsSentRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsSentRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsSentRequest *_mYSMSAPINS0RemoteSmsSentRequest = [[MYSMSAPINS0RemoteSmsSentRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsSentRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsSentRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsSentRequest autorelease];
  return _mYSMSAPINS0RemoteSmsSentRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsSentRequest 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 MYSMSAPINS0RemoteSmsSentRequest 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 MYSMSAPINS0RemoteSmsSentRequest from an XML reader. The element to be read is
 * "remoteSmsSentRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsSentRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsSentRequest *_remoteSmsSentRequest = 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 remoteSmsSentRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsSentRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsSentRequest.");
#endif
    _remoteSmsSentRequest = (MYSMSAPINS0RemoteSmsSentRequest *)[MYSMSAPINS0RemoteSmsSentRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsSentRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSentRequest. Expected element remoteSmsSentRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSentRequest. Expected element remoteSmsSentRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsSentRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSentRequest to XML under element name "remoteSmsSentRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsSentRequest The RemoteSmsSentRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSentRequest 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 "remoteSmsSentRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsSentRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsSentRequest for root element {}remoteSmsSentRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsSentRequest for root element {}remoteSmsSentRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsSentRequest. 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 "requestId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRequestId: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceMessageId", 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 setDeviceMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "origin", 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 setOrigin: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: ((int*) _child_accessor)];
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSent", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSent of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSent: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}requestId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}requestId...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_requestId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}requestId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}requestId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}requestId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceMessageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceMessageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceMessageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceMessageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceMessageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceMessageId."];
    }
  }
  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "origin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}origin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}origin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_origin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}origin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}origin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}origin."];
    }
  }
  if ([self status] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}status...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self status]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}status...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}status."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}status."];
    }
  }
  if ([self dateSent]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSent", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSent."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSent...");
#endif
    [[self dateSent] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSent...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSent."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsSentRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsSentRequest_M */
#ifndef DEF_MYSMSAPINS0ShopRedeemTokenRequest_M
#define DEF_MYSMSAPINS0ShopRedeemTokenRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopRedeemTokenRequest

/**
 * The token to redeem.
 */
- (NSString *) token
{
  return _token;
}

/**
 * The token to redeem.
 */
- (void) setToken: (NSString *) newToken
{
  [newToken retain];
  [_token release];
  _token = newToken;
}

- (void) dealloc
{
  [self setToken: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopRedeemTokenRequest *_mYSMSAPINS0ShopRedeemTokenRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopRedeemTokenRequest = (MYSMSAPINS0ShopRedeemTokenRequest *) [MYSMSAPINS0ShopRedeemTokenRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopRedeemTokenRequest;
}

//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 MYSMSAPINS0ShopRedeemTokenRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopRedeemTokenRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopRedeemTokenRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopRedeemTokenRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopRedeemTokenRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopRedeemTokenRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopRedeemTokenRequest *_mYSMSAPINS0ShopRedeemTokenRequest = [[MYSMSAPINS0ShopRedeemTokenRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopRedeemTokenRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopRedeemTokenRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopRedeemTokenRequest autorelease];
  return _mYSMSAPINS0ShopRedeemTokenRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopRedeemTokenRequest 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 MYSMSAPINS0ShopRedeemTokenRequest 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 MYSMSAPINS0ShopRedeemTokenRequest from an XML reader. The element to be read is
 * "shopRedeemTokenRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopRedeemTokenRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopRedeemTokenRequest *_shopRedeemTokenRequest = 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 shopRedeemTokenRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopRedeemTokenRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopRedeemTokenRequest.");
#endif
    _shopRedeemTokenRequest = (MYSMSAPINS0ShopRedeemTokenRequest *)[MYSMSAPINS0ShopRedeemTokenRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopRedeemTokenRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopRedeemTokenRequest. Expected element shopRedeemTokenRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopRedeemTokenRequest. Expected element shopRedeemTokenRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopRedeemTokenRequest;
}

/**
 * Writes this MYSMSAPINS0ShopRedeemTokenRequest to XML under element name "shopRedeemTokenRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopRedeemTokenRequest The ShopRedeemTokenRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopRedeemTokenRequest 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 "shopRedeemTokenRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopRedeemTokenRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopRedeemTokenRequest for root element {}shopRedeemTokenRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopRedeemTokenRequest for root element {}shopRedeemTokenRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopRedeemTokenRequest. 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 "token", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}token of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}token of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self token]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "token", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}token."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}token...");
#endif
    [[self token] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}token...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}token."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopRedeemTokenRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopRedeemTokenRequest_M */
#ifndef DEF_MYSMSAPINS0SmsSendRequest_M
#define DEF_MYSMSAPINS0SmsSendRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsSendRequest

/**
 * The recipients in international format (436761234567)
 */
- (NSArray *) recipients
{
  return _recipients;
}

/**
 * The recipients in international format (436761234567)
 */
- (void) setRecipients: (NSArray *) newRecipients
{
  [newRecipients retain];
  [_recipients release];
  _recipients = newRecipients;
}

/**
 * The message to send
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The encoding for the message (0 => 7-bit, 1 => 8-bit, 2 => UCS2)
 */
- (int) encoding
{
  return _encoding;
}

/**
 * The encoding for the message (0 => 7-bit, 1 => 8-bit, 2 => UCS2)
 */
- (void) setEncoding: (int) newEncoding
{
  _encoding = newEncoding;
}

/**
 * True if a confirmation of delivery (cod) is requested.
 * 
 * If a cod is requested the messages must be created on the server and are synchronized to the client device otherwise
 * the messages will not be created on the server side (old functionality).
 */
- (BOOL) cod
{
  return _cod;
}

/**
 * True if a confirmation of delivery (cod) is requested.
 * 
 * If a cod is requested the messages must be created on the server and are synchronized to the client device otherwise
 * the messages will not be created on the server side (old functionality).
 */
- (void) setCod: (BOOL) newCod
{
  _cod = newCod;
}

/**
 * The registered device id for the device if their is one.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device if their is one.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * True if the parameter should be checked without sending the sms.
 */
- (BOOL) test
{
  return _test;
}

/**
 * True if the parameter should be checked without sending the sms.
 */
- (void) setTest: (BOOL) newTest
{
  _test = newTest;
}

- (void) dealloc
{
  [self setRecipients: nil];
  [self setMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsSendRequest *_mYSMSAPINS0SmsSendRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsSendRequest = (MYSMSAPINS0SmsSendRequest *) [MYSMSAPINS0SmsSendRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsSendRequest;
}

//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 MYSMSAPINS0SmsSendRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsSendRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsSendRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsSendRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsSendRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsSendRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsSendRequest *_mYSMSAPINS0SmsSendRequest = [[MYSMSAPINS0SmsSendRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsSendRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsSendRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsSendRequest autorelease];
  return _mYSMSAPINS0SmsSendRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsSendRequest 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 MYSMSAPINS0SmsSendRequest 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 MYSMSAPINS0SmsSendRequest from an XML reader. The element to be read is
 * "smsSendRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsSendRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsSendRequest *_smsSendRequest = 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 smsSendRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsSendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsSendRequest.");
#endif
    _smsSendRequest = (MYSMSAPINS0SmsSendRequest *)[MYSMSAPINS0SmsSendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsSendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendRequest. Expected element smsSendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendRequest. Expected element smsSendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsSendRequest;
}

/**
 * Writes this MYSMSAPINS0SmsSendRequest to XML under element name "smsSendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsSendRequest The SmsSendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsSendRequest 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 "smsSendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsSendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsSendRequest for root element {}smsSendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsSendRequest for root element {}smsSendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsSendRequest. 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 "recipients", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}recipients of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(long long)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}recipients of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    if ([self recipients]) {
      [self setRecipients: [[self recipients] arrayByAddingObject: __child]];
    }
    else {
      [self setRecipients: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "encoding", 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 setEncoding: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "cod", 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 setCod: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "test", 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 setTest: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self recipients]) {
    __enumerator = [[self recipients] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipients", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}recipients."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}recipients...");
#endif
      status = xmlTextWriterWriteLongType(writer, ((long long*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}recipients."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}recipients...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}recipients."];
      }
    } //end item iterator.
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "encoding", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}encoding."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}encoding...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_encoding);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}encoding...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}encoding."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}encoding."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "cod", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}cod."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}cod...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_cod);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}cod...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}cod."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}cod."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "test", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}test."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}test...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_test);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}test...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}test."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}test."];
    }
  }
}
@end /* implementation MYSMSAPINS0SmsSendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsSendRequest_M */
#ifndef DEF_MYSMSAPINS0SmsConnectorGetConnectorsRequest_M
#define DEF_MYSMSAPINS0SmsConnectorGetConnectorsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsConnectorGetConnectorsRequest

/**
 * The operation system for which we should get the list of connectors.
 * 
 * 0 .. android
 */
- (int) os
{
  return _os;
}

/**
 * The operation system for which we should get the list of connectors.
 * 
 * 0 .. android
 */
- (void) setOs: (int) newOs
{
  _os = newOs;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsConnectorGetConnectorsRequest *_mYSMSAPINS0SmsConnectorGetConnectorsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsConnectorGetConnectorsRequest = (MYSMSAPINS0SmsConnectorGetConnectorsRequest *) [MYSMSAPINS0SmsConnectorGetConnectorsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsConnectorGetConnectorsRequest;
}

//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 MYSMSAPINS0SmsConnectorGetConnectorsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsConnectorGetConnectorsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsConnectorGetConnectorsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsConnectorGetConnectorsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsConnectorGetConnectorsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsConnectorGetConnectorsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsConnectorGetConnectorsRequest *_mYSMSAPINS0SmsConnectorGetConnectorsRequest = [[MYSMSAPINS0SmsConnectorGetConnectorsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsConnectorGetConnectorsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsConnectorGetConnectorsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsConnectorGetConnectorsRequest autorelease];
  return _mYSMSAPINS0SmsConnectorGetConnectorsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsConnectorGetConnectorsRequest 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 MYSMSAPINS0SmsConnectorGetConnectorsRequest 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 MYSMSAPINS0SmsConnectorGetConnectorsRequest from an XML reader. The element to be read is
 * "smsConnectorGetConnectorsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsConnectorGetConnectorsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsConnectorGetConnectorsRequest *_smsConnectorGetConnectorsRequest = 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 smsConnectorGetConnectorsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsConnectorGetConnectorsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsConnectorGetConnectorsRequest.");
#endif
    _smsConnectorGetConnectorsRequest = (MYSMSAPINS0SmsConnectorGetConnectorsRequest *)[MYSMSAPINS0SmsConnectorGetConnectorsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsConnectorGetConnectorsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorGetConnectorsRequest. Expected element smsConnectorGetConnectorsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorGetConnectorsRequest. Expected element smsConnectorGetConnectorsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsConnectorGetConnectorsRequest;
}

/**
 * Writes this MYSMSAPINS0SmsConnectorGetConnectorsRequest to XML under element name "smsConnectorGetConnectorsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsConnectorGetConnectorsRequest The SmsConnectorGetConnectorsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsConnectorGetConnectorsRequest 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 "smsConnectorGetConnectorsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsConnectorGetConnectorsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsConnectorGetConnectorsRequest for root element {}smsConnectorGetConnectorsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsConnectorGetConnectorsRequest for root element {}smsConnectorGetConnectorsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsConnectorGetConnectorsRequest. 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 "os", 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 setOs: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "os", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}os."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}os...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_os);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}os...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}os."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}os."];
    }
  }
}
@end /* implementation MYSMSAPINS0SmsConnectorGetConnectorsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsConnectorGetConnectorsRequest_M */
#ifndef DEF_MYSMSAPINS0UserDeleteRequest_M
#define DEF_MYSMSAPINS0UserDeleteRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeleteRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeleteRequest *_mYSMSAPINS0UserDeleteRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeleteRequest = (MYSMSAPINS0UserDeleteRequest *) [MYSMSAPINS0UserDeleteRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeleteRequest;
}

//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 MYSMSAPINS0UserDeleteRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeleteRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeleteRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeleteRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeleteRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeleteRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeleteRequest *_mYSMSAPINS0UserDeleteRequest = [[MYSMSAPINS0UserDeleteRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeleteRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeleteRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeleteRequest autorelease];
  return _mYSMSAPINS0UserDeleteRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeleteRequest 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 MYSMSAPINS0UserDeleteRequest 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 MYSMSAPINS0UserDeleteRequest from an XML reader. The element to be read is
 * "userDeleteRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeleteRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeleteRequest *_userDeleteRequest = 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 userDeleteRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeleteRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeleteRequest.");
#endif
    _userDeleteRequest = (MYSMSAPINS0UserDeleteRequest *)[MYSMSAPINS0UserDeleteRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeleteRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeleteRequest. Expected element userDeleteRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeleteRequest. Expected element userDeleteRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeleteRequest;
}

/**
 * Writes this MYSMSAPINS0UserDeleteRequest to XML under element name "userDeleteRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeleteRequest The UserDeleteRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeleteRequest 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 "userDeleteRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeleteRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeleteRequest for root element {}userDeleteRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeleteRequest for root element {}userDeleteRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeleteRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserDeleteRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeleteRequest_M */
#ifndef DEF_MYSMSAPINS0UserGetFeatureRequest_M
#define DEF_MYSMSAPINS0UserGetFeatureRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetFeatureRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetFeatureRequest *_mYSMSAPINS0UserGetFeatureRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetFeatureRequest = (MYSMSAPINS0UserGetFeatureRequest *) [MYSMSAPINS0UserGetFeatureRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetFeatureRequest;
}

//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 MYSMSAPINS0UserGetFeatureRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetFeatureRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetFeatureRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetFeatureRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetFeatureRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetFeatureRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetFeatureRequest *_mYSMSAPINS0UserGetFeatureRequest = [[MYSMSAPINS0UserGetFeatureRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetFeatureRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetFeatureRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetFeatureRequest autorelease];
  return _mYSMSAPINS0UserGetFeatureRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetFeatureRequest 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 MYSMSAPINS0UserGetFeatureRequest 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 MYSMSAPINS0UserGetFeatureRequest from an XML reader. The element to be read is
 * "userGetFeatureRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetFeatureRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetFeatureRequest *_userGetFeatureRequest = 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 userGetFeatureRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetFeatureRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetFeatureRequest.");
#endif
    _userGetFeatureRequest = (MYSMSAPINS0UserGetFeatureRequest *)[MYSMSAPINS0UserGetFeatureRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetFeatureRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetFeatureRequest. Expected element userGetFeatureRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetFeatureRequest. Expected element userGetFeatureRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetFeatureRequest;
}

/**
 * Writes this MYSMSAPINS0UserGetFeatureRequest to XML under element name "userGetFeatureRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetFeatureRequest The UserGetFeatureRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetFeatureRequest 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 "userGetFeatureRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetFeatureRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetFeatureRequest for root element {}userGetFeatureRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetFeatureRequest for root element {}userGetFeatureRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetFeatureRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserGetFeatureRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetFeatureRequest_M */
#ifndef DEF_MYSMSAPINS0UserSetSmsRoutingRequest_M
#define DEF_MYSMSAPINS0UserSetSmsRoutingRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSetSmsRoutingRequest

/**
 * The mobile number of the recipient
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The mobile number of the recipient
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The sms routing.
 * <br/>
 * 0 .. send sms over sim <br/>
 * 1 .. send sms over mysms<br/>
 * or a sms connector id<br/>
 */
- (int) smsRouting
{
  return _smsRouting;
}

/**
 * The sms routing.
 * <br/>
 * 0 .. send sms over sim <br/>
 * 1 .. send sms over mysms<br/>
 * or a sms connector id<br/>
 */
- (void) setSmsRouting: (int) newSmsRouting
{
  _smsRouting = newSmsRouting;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSetSmsRoutingRequest *_mYSMSAPINS0UserSetSmsRoutingRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSetSmsRoutingRequest = (MYSMSAPINS0UserSetSmsRoutingRequest *) [MYSMSAPINS0UserSetSmsRoutingRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSetSmsRoutingRequest;
}

//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 MYSMSAPINS0UserSetSmsRoutingRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSetSmsRoutingRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSetSmsRoutingRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSetSmsRoutingRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSetSmsRoutingRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSetSmsRoutingRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSetSmsRoutingRequest *_mYSMSAPINS0UserSetSmsRoutingRequest = [[MYSMSAPINS0UserSetSmsRoutingRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSetSmsRoutingRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSetSmsRoutingRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSetSmsRoutingRequest autorelease];
  return _mYSMSAPINS0UserSetSmsRoutingRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSetSmsRoutingRequest 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 MYSMSAPINS0UserSetSmsRoutingRequest 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 MYSMSAPINS0UserSetSmsRoutingRequest from an XML reader. The element to be read is
 * "userSetSmsRoutingRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSetSmsRoutingRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSetSmsRoutingRequest *_userSetSmsRoutingRequest = 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 userSetSmsRoutingRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSetSmsRoutingRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSetSmsRoutingRequest.");
#endif
    _userSetSmsRoutingRequest = (MYSMSAPINS0UserSetSmsRoutingRequest *)[MYSMSAPINS0UserSetSmsRoutingRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSetSmsRoutingRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSmsRoutingRequest. Expected element userSetSmsRoutingRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSmsRoutingRequest. Expected element userSetSmsRoutingRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSetSmsRoutingRequest;
}

/**
 * Writes this MYSMSAPINS0UserSetSmsRoutingRequest to XML under element name "userSetSmsRoutingRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSetSmsRoutingRequest The UserSetSmsRoutingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSetSmsRoutingRequest 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 "userSetSmsRoutingRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSetSmsRoutingRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSetSmsRoutingRequest for root element {}userSetSmsRoutingRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSetSmsRoutingRequest for root element {}userSetSmsRoutingRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSetSmsRoutingRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsRouting", 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 setSmsRouting: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsRouting", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsRouting."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsRouting...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsRouting);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsRouting...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsRouting."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsRouting."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSetSmsRoutingRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSetSmsRoutingRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallCountUnreadRequest_M
#define DEF_MYSMSAPINS0UserCallCountUnreadRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallCountUnreadRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallCountUnreadRequest *_mYSMSAPINS0UserCallCountUnreadRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallCountUnreadRequest = (MYSMSAPINS0UserCallCountUnreadRequest *) [MYSMSAPINS0UserCallCountUnreadRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallCountUnreadRequest;
}

//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 MYSMSAPINS0UserCallCountUnreadRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallCountUnreadRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallCountUnreadRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallCountUnreadRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallCountUnreadRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallCountUnreadRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallCountUnreadRequest *_mYSMSAPINS0UserCallCountUnreadRequest = [[MYSMSAPINS0UserCallCountUnreadRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallCountUnreadRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallCountUnreadRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallCountUnreadRequest autorelease];
  return _mYSMSAPINS0UserCallCountUnreadRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallCountUnreadRequest 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 MYSMSAPINS0UserCallCountUnreadRequest 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 MYSMSAPINS0UserCallCountUnreadRequest from an XML reader. The element to be read is
 * "userCallCountUnreadRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallCountUnreadRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallCountUnreadRequest *_userCallCountUnreadRequest = 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 userCallCountUnreadRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallCountUnreadRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallCountUnreadRequest.");
#endif
    _userCallCountUnreadRequest = (MYSMSAPINS0UserCallCountUnreadRequest *)[MYSMSAPINS0UserCallCountUnreadRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallCountUnreadRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallCountUnreadRequest. Expected element userCallCountUnreadRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallCountUnreadRequest. Expected element userCallCountUnreadRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallCountUnreadRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallCountUnreadRequest to XML under element name "userCallCountUnreadRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallCountUnreadRequest The UserCallCountUnreadRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallCountUnreadRequest 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 "userCallCountUnreadRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallCountUnreadRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallCountUnreadRequest for root element {}userCallCountUnreadRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallCountUnreadRequest for root element {}userCallCountUnreadRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallCountUnreadRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallCountUnreadRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallCountUnreadRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallDeleteListRequest_M
#define DEF_MYSMSAPINS0UserCallDeleteListRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallDeleteListRequest

/**
 * The call ids of the calls which should be deleted.
 */
- (NSArray *) callIds
{
  return _callIds;
}

/**
 * The call ids of the calls which should be deleted.
 */
- (void) setCallIds: (NSArray *) newCallIds
{
  [newCallIds retain];
  [_callIds release];
  _callIds = newCallIds;
}

- (void) dealloc
{
  [self setCallIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallDeleteListRequest *_mYSMSAPINS0UserCallDeleteListRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallDeleteListRequest = (MYSMSAPINS0UserCallDeleteListRequest *) [MYSMSAPINS0UserCallDeleteListRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallDeleteListRequest;
}

//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 MYSMSAPINS0UserCallDeleteListRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallDeleteListRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallDeleteListRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallDeleteListRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallDeleteListRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallDeleteListRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallDeleteListRequest *_mYSMSAPINS0UserCallDeleteListRequest = [[MYSMSAPINS0UserCallDeleteListRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallDeleteListRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallDeleteListRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallDeleteListRequest autorelease];
  return _mYSMSAPINS0UserCallDeleteListRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallDeleteListRequest 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 MYSMSAPINS0UserCallDeleteListRequest 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 MYSMSAPINS0UserCallDeleteListRequest from an XML reader. The element to be read is
 * "userCallDeleteListRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallDeleteListRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallDeleteListRequest *_userCallDeleteListRequest = 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 userCallDeleteListRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallDeleteListRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallDeleteListRequest.");
#endif
    _userCallDeleteListRequest = (MYSMSAPINS0UserCallDeleteListRequest *)[MYSMSAPINS0UserCallDeleteListRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallDeleteListRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteListRequest. Expected element userCallDeleteListRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteListRequest. Expected element userCallDeleteListRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallDeleteListRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteListRequest to XML under element name "userCallDeleteListRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallDeleteListRequest The UserCallDeleteListRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteListRequest 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 "userCallDeleteListRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallDeleteListRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallDeleteListRequest for root element {}userCallDeleteListRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallDeleteListRequest for root element {}userCallDeleteListRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallDeleteListRequest. 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 "callIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}callIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    _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."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(int)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}callIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    if ([self callIds]) {
      [self setCallIds: [[self callIds] arrayByAddingObject: __child]];
    }
    else {
      [self setCallIds: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self callIds]) {
    __enumerator = [[self callIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}callIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}callIds...");
#endif
      status = xmlTextWriterWriteIntType(writer, ((int*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}callIds."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}callIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}callIds."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserCallDeleteListRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallDeleteListRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallInsertRequest_M
#define DEF_MYSMSAPINS0UserCallInsertRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallInsertRequest

/**
 * The address of the call in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 * (20 chars allowed, more will be truncated)
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the call in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 * (20 chars allowed, more will be truncated)
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The call direction (incoming or outgoing) state
 */
- (BOOL) incoming
{
  return _incoming;
}

/**
 * The call direction (incoming or outgoing) state
 */
- (void) setIncoming: (BOOL) newIncoming
{
  _incoming = newIncoming;
}

/**
 * The call read state
 */
- (BOOL) read
{
  return _read;
}

/**
 * The call read state
 */
- (void) setRead: (BOOL) newRead
{
  _read = newRead;
}

/**
 * The duration of the call in seconds
 */
- (int) duration
{
  return _duration;
}

/**
 * The duration of the call in seconds
 */
- (void) setDuration: (int) newDuration
{
  _duration = newDuration;
}

/**
 * The status of the call
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (int) status
{
  return _status;
}

/**
 * The status of the call
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (void) setStatus: (int) newStatus
{
  _status = newStatus;
}

/**
 * The date when the call was initiated
 */
- (NSDate *) dateCall
{
  return _dateCall;
}

/**
 * The date when the call was initiated
 */
- (void) setDateCall: (NSDate *) newDateCall
{
  [newDateCall retain];
  [_dateCall release];
  _dateCall = newDateCall;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setDateCall: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallInsertRequest *_mYSMSAPINS0UserCallInsertRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallInsertRequest = (MYSMSAPINS0UserCallInsertRequest *) [MYSMSAPINS0UserCallInsertRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallInsertRequest;
}

//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 MYSMSAPINS0UserCallInsertRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallInsertRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallInsertRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallInsertRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallInsertRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallInsertRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallInsertRequest *_mYSMSAPINS0UserCallInsertRequest = [[MYSMSAPINS0UserCallInsertRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallInsertRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallInsertRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallInsertRequest autorelease];
  return _mYSMSAPINS0UserCallInsertRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallInsertRequest 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 MYSMSAPINS0UserCallInsertRequest 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 MYSMSAPINS0UserCallInsertRequest from an XML reader. The element to be read is
 * "userCallInsertRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallInsertRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallInsertRequest *_userCallInsertRequest = 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 userCallInsertRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallInsertRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallInsertRequest.");
#endif
    _userCallInsertRequest = (MYSMSAPINS0UserCallInsertRequest *)[MYSMSAPINS0UserCallInsertRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallInsertRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallInsertRequest. Expected element userCallInsertRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallInsertRequest. Expected element userCallInsertRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallInsertRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallInsertRequest to XML under element name "userCallInsertRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallInsertRequest The UserCallInsertRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallInsertRequest 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 "userCallInsertRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallInsertRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallInsertRequest for root element {}userCallInsertRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallInsertRequest for root element {}userCallInsertRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallInsertRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "incoming", 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 setIncoming: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "read", 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 setRead: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "duration", 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 setDuration: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateCall", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateCall of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateCall of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateCall: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "incoming", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}incoming."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}incoming...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_incoming);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}incoming...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}incoming."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}incoming."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "read", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}read."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}read...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_read);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}read...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}read."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}read."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "duration", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}duration."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}duration...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_duration);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}duration...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}duration."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}duration."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}status...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_status);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}status...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}status."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}status."];
    }
  }
  if ([self dateCall]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateCall", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateCall."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateCall...");
#endif
    [[self dateCall] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateCall...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateCall."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallInsertRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallInsertRequest_M */
#ifndef DEF_MYSMSAPINS0UserContactGetA2aMsisdnsRequest_M
#define DEF_MYSMSAPINS0UserContactGetA2aMsisdnsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactGetA2aMsisdnsRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactGetA2aMsisdnsRequest *_mYSMSAPINS0UserContactGetA2aMsisdnsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactGetA2aMsisdnsRequest = (MYSMSAPINS0UserContactGetA2aMsisdnsRequest *) [MYSMSAPINS0UserContactGetA2aMsisdnsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactGetA2aMsisdnsRequest;
}

//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 MYSMSAPINS0UserContactGetA2aMsisdnsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactGetA2aMsisdnsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactGetA2aMsisdnsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactGetA2aMsisdnsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactGetA2aMsisdnsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactGetA2aMsisdnsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactGetA2aMsisdnsRequest *_mYSMSAPINS0UserContactGetA2aMsisdnsRequest = [[MYSMSAPINS0UserContactGetA2aMsisdnsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactGetA2aMsisdnsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactGetA2aMsisdnsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactGetA2aMsisdnsRequest autorelease];
  return _mYSMSAPINS0UserContactGetA2aMsisdnsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactGetA2aMsisdnsRequest 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 MYSMSAPINS0UserContactGetA2aMsisdnsRequest 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 MYSMSAPINS0UserContactGetA2aMsisdnsRequest from an XML reader. The element to be read is
 * "userContactGetA2aMsisdnsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactGetA2aMsisdnsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactGetA2aMsisdnsRequest *_userContactGetA2aMsisdnsRequest = 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 userContactGetA2aMsisdnsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactGetA2aMsisdnsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactGetA2aMsisdnsRequest.");
#endif
    _userContactGetA2aMsisdnsRequest = (MYSMSAPINS0UserContactGetA2aMsisdnsRequest *)[MYSMSAPINS0UserContactGetA2aMsisdnsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactGetA2aMsisdnsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetA2aMsisdnsRequest. Expected element userContactGetA2aMsisdnsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetA2aMsisdnsRequest. Expected element userContactGetA2aMsisdnsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactGetA2aMsisdnsRequest;
}

/**
 * Writes this MYSMSAPINS0UserContactGetA2aMsisdnsRequest to XML under element name "userContactGetA2aMsisdnsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactGetA2aMsisdnsRequest The UserContactGetA2aMsisdnsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactGetA2aMsisdnsRequest 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 "userContactGetA2aMsisdnsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactGetA2aMsisdnsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactGetA2aMsisdnsRequest for root element {}userContactGetA2aMsisdnsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactGetA2aMsisdnsRequest for root element {}userContactGetA2aMsisdnsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactGetA2aMsisdnsRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserContactGetA2aMsisdnsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactGetA2aMsisdnsRequest_M */
#ifndef DEF_MYSMSAPINS0UserContactSyncRequest_M
#define DEF_MYSMSAPINS0UserContactSyncRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactSyncRequest

/**
 * The registered device id for the device.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * The contacts that was modified on the device and needs to be synced to the server.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The contacts that was modified on the device and needs to be synced to the server.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of contacts synchronized previously from the server.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of contacts synchronized previously from the server.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

/**
 * The maximum amount of contacts that will be returned from server
 */
- (int) syncLimit
{
  return _syncLimit;
}

/**
 * The maximum amount of contacts that will be returned from server
 */
- (void) setSyncLimit: (int) newSyncLimit
{
  _syncLimit = newSyncLimit;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (BOOL *) syncInitial
{
  return _syncInitial;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (void) setSyncInitial: (BOOL *) newSyncInitial
{
  if (_syncInitial != NULL) {
    free(_syncInitial);
  }
  _syncInitial = newSyncInitial;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [self setSyncInitial: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactSyncRequest *_mYSMSAPINS0UserContactSyncRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactSyncRequest = (MYSMSAPINS0UserContactSyncRequest *) [MYSMSAPINS0UserContactSyncRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactSyncRequest;
}

//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 MYSMSAPINS0UserContactSyncRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactSyncRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactSyncRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactSyncRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactSyncRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactSyncRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactSyncRequest *_mYSMSAPINS0UserContactSyncRequest = [[MYSMSAPINS0UserContactSyncRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactSyncRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactSyncRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactSyncRequest autorelease];
  return _mYSMSAPINS0UserContactSyncRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactSyncRequest 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 MYSMSAPINS0UserContactSyncRequest 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 MYSMSAPINS0UserContactSyncRequest from an XML reader. The element to be read is
 * "userContactSyncRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactSyncRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactSyncRequest *_userContactSyncRequest = 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 userContactSyncRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactSyncRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactSyncRequest.");
#endif
    _userContactSyncRequest = (MYSMSAPINS0UserContactSyncRequest *)[MYSMSAPINS0UserContactSyncRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactSyncRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactSyncRequest. Expected element userContactSyncRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactSyncRequest. Expected element userContactSyncRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactSyncRequest;
}

/**
 * Writes this MYSMSAPINS0UserContactSyncRequest to XML under element name "userContactSyncRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactSyncRequest The UserContactSyncRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactSyncRequest 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 "userContactSyncRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactSyncRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactSyncRequest for root element {}userContactSyncRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactSyncRequest for root element {}userContactSyncRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactSyncRequest. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userContactSync.");
#endif

     __child = [MYSMSAPINS0UserContactSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userContactSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userContactSyncAck.");
#endif

     __child = [MYSMSAPINS0UserContactSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userContactSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncLimit", 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 setSyncLimit: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncInitial", 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 setSyncInitial: ((BOOL*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncLimit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncLimit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncLimit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_syncLimit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncLimit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncLimit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncLimit."];
    }
  }
  if ([self syncInitial] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncInitial", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncInitial."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncInitial...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self syncInitial]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncInitial...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncInitial."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncInitial."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserContactSyncRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactSyncRequest_M */
#ifndef DEF_MYSMSAPINS0UserDeviceClientGetRequest_M
#define DEF_MYSMSAPINS0UserDeviceClientGetRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceClientGetRequest

/**
 * The os of the client device
 * 
 * 0 .. android (cd2m)
 * 1 .. ios
 * 2 .. symbian
 * 6 .. android (gcm)
 * 7 .. windows (metro)
 */
- (int) os
{
  return _os;
}

/**
 * The os of the client device
 * 
 * 0 .. android (cd2m)
 * 1 .. ios
 * 2 .. symbian
 * 6 .. android (gcm)
 * 7 .. windows (metro)
 */
- (void) setOs: (int) newOs
{
  _os = newOs;
}

/**
 * The push registration id depends on the os.
 * <br/>
 * android: c2dm registration id<br/>
 * ios: push notification device id<br/>
 */
- (NSString *) pushRegistrationId
{
  return _pushRegistrationId;
}

/**
 * The push registration id depends on the os.
 * <br/>
 * android: c2dm registration id<br/>
 * ios: push notification device id<br/>
 */
- (void) setPushRegistrationId: (NSString *) newPushRegistrationId
{
  [newPushRegistrationId retain];
  [_pushRegistrationId release];
  _pushRegistrationId = newPushRegistrationId;
}

/**
 * Sets the push config which depends on the os and is usually a in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (NSString *) pushConfig
{
  return _pushConfig;
}

/**
 * Sets the push config which depends on the os and is usually a in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (void) setPushConfig: (NSString *) newPushConfig
{
  [newPushConfig retain];
  [_pushConfig release];
  _pushConfig = newPushConfig;
}

- (void) dealloc
{
  [self setPushRegistrationId: nil];
  [self setPushConfig: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceClientGetRequest *_mYSMSAPINS0UserDeviceClientGetRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceClientGetRequest = (MYSMSAPINS0UserDeviceClientGetRequest *) [MYSMSAPINS0UserDeviceClientGetRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceClientGetRequest;
}

//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 MYSMSAPINS0UserDeviceClientGetRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceClientGetRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceClientGetRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceClientGetRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceClientGetRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceClientGetRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceClientGetRequest *_mYSMSAPINS0UserDeviceClientGetRequest = [[MYSMSAPINS0UserDeviceClientGetRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceClientGetRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceClientGetRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceClientGetRequest autorelease];
  return _mYSMSAPINS0UserDeviceClientGetRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceClientGetRequest 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 MYSMSAPINS0UserDeviceClientGetRequest 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 MYSMSAPINS0UserDeviceClientGetRequest from an XML reader. The element to be read is
 * "userDeviceClientGetRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceClientGetRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceClientGetRequest *_userDeviceClientGetRequest = 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 userDeviceClientGetRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceClientGetRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceClientGetRequest.");
#endif
    _userDeviceClientGetRequest = (MYSMSAPINS0UserDeviceClientGetRequest *)[MYSMSAPINS0UserDeviceClientGetRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceClientGetRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientGetRequest. Expected element userDeviceClientGetRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientGetRequest. Expected element userDeviceClientGetRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceClientGetRequest;
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientGetRequest to XML under element name "userDeviceClientGetRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceClientGetRequest The UserDeviceClientGetRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientGetRequest 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 "userDeviceClientGetRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceClientGetRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceClientGetRequest for root element {}userDeviceClientGetRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceClientGetRequest for root element {}userDeviceClientGetRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceClientGetRequest. 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 "os", 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 setOs: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushRegistrationId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushRegistrationId: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushConfig", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushConfig: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "os", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}os."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}os...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_os);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}os...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}os."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}os."];
    }
  }
  if ([self pushRegistrationId]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushRegistrationId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushRegistrationId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushRegistrationId...");
#endif
    [[self pushRegistrationId] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushRegistrationId...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushRegistrationId."];
    }
  }
  if ([self pushConfig]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushConfig", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushConfig."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushConfig...");
#endif
    [[self pushConfig] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushConfig...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushConfig."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceClientGetRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceClientGetRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteConversationListRequest_M
#define DEF_MYSMSAPINS0UserMessageDeleteConversationListRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationListRequest

/**
 * The addresses of the conversations which should be deleted.
 */
- (NSArray *) addresses
{
  return _addresses;
}

/**
 * The addresses of the conversations which should be deleted.
 */
- (void) setAddresses: (NSArray *) newAddresses
{
  [newAddresses retain];
  [_addresses release];
  _addresses = newAddresses;
}

- (void) dealloc
{
  [self setAddresses: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteConversationListRequest *_mYSMSAPINS0UserMessageDeleteConversationListRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteConversationListRequest = (MYSMSAPINS0UserMessageDeleteConversationListRequest *) [MYSMSAPINS0UserMessageDeleteConversationListRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteConversationListRequest;
}

//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 MYSMSAPINS0UserMessageDeleteConversationListRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteConversationListRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteConversationListRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationListRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteConversationListRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteConversationListRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteConversationListRequest *_mYSMSAPINS0UserMessageDeleteConversationListRequest = [[MYSMSAPINS0UserMessageDeleteConversationListRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteConversationListRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteConversationListRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteConversationListRequest autorelease];
  return _mYSMSAPINS0UserMessageDeleteConversationListRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteConversationListRequest 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 MYSMSAPINS0UserMessageDeleteConversationListRequest 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 MYSMSAPINS0UserMessageDeleteConversationListRequest from an XML reader. The element to be read is
 * "userMessageDeleteConversationListRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteConversationListRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteConversationListRequest *_userMessageDeleteConversationListRequest = 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 userMessageDeleteConversationListRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteConversationListRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteConversationListRequest.");
#endif
    _userMessageDeleteConversationListRequest = (MYSMSAPINS0UserMessageDeleteConversationListRequest *)[MYSMSAPINS0UserMessageDeleteConversationListRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteConversationListRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationListRequest. Expected element userMessageDeleteConversationListRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationListRequest. Expected element userMessageDeleteConversationListRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteConversationListRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationListRequest to XML under element name "userMessageDeleteConversationListRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteConversationListRequest The UserMessageDeleteConversationListRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationListRequest 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 "userMessageDeleteConversationListRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteConversationListRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteConversationListRequest for root element {}userMessageDeleteConversationListRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteConversationListRequest for root element {}userMessageDeleteConversationListRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteConversationListRequest. 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 "addresses", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}addresses of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

     __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}addresses of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    if ([self addresses]) {
      [self setAddresses: [[self addresses] arrayByAddingObject: __child]];
    }
    else {
      [self setAddresses: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self addresses]) {
    __enumerator = [[self addresses] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "addresses", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}addresses."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}addresses...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}addresses...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}addresses."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageDeleteConversationListRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteConversationListRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteListRequest_M
#define DEF_MYSMSAPINS0UserMessageDeleteListRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteListRequest

/**
 * The message ids of the messages which should be deleted.
 */
- (NSArray *) messageIds
{
  return _messageIds;
}

/**
 * The message ids of the messages which should be deleted.
 */
- (void) setMessageIds: (NSArray *) newMessageIds
{
  [newMessageIds retain];
  [_messageIds release];
  _messageIds = newMessageIds;
}

- (void) dealloc
{
  [self setMessageIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteListRequest *_mYSMSAPINS0UserMessageDeleteListRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteListRequest = (MYSMSAPINS0UserMessageDeleteListRequest *) [MYSMSAPINS0UserMessageDeleteListRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteListRequest;
}

//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 MYSMSAPINS0UserMessageDeleteListRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteListRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteListRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteListRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteListRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteListRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteListRequest *_mYSMSAPINS0UserMessageDeleteListRequest = [[MYSMSAPINS0UserMessageDeleteListRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteListRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteListRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteListRequest autorelease];
  return _mYSMSAPINS0UserMessageDeleteListRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteListRequest 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 MYSMSAPINS0UserMessageDeleteListRequest 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 MYSMSAPINS0UserMessageDeleteListRequest from an XML reader. The element to be read is
 * "userMessageDeleteListRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteListRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteListRequest *_userMessageDeleteListRequest = 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 userMessageDeleteListRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteListRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteListRequest.");
#endif
    _userMessageDeleteListRequest = (MYSMSAPINS0UserMessageDeleteListRequest *)[MYSMSAPINS0UserMessageDeleteListRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteListRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteListRequest. Expected element userMessageDeleteListRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteListRequest. Expected element userMessageDeleteListRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteListRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteListRequest to XML under element name "userMessageDeleteListRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteListRequest The UserMessageDeleteListRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteListRequest 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 "userMessageDeleteListRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteListRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteListRequest for root element {}userMessageDeleteListRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteListRequest for root element {}userMessageDeleteListRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteListRequest. 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 "messageIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    _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."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(int)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    if ([self messageIds]) {
      [self setMessageIds: [[self messageIds] arrayByAddingObject: __child]];
    }
    else {
      [self setMessageIds: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self messageIds]) {
    __enumerator = [[self messageIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}messageIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}messageIds...");
#endif
      status = xmlTextWriterWriteIntType(writer, ((int*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}messageIds."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}messageIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}messageIds."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageDeleteListRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteListRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageGetConversationsRequest_M
#define DEF_MYSMSAPINS0UserMessageGetConversationsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageGetConversationsRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageGetConversationsRequest *_mYSMSAPINS0UserMessageGetConversationsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageGetConversationsRequest = (MYSMSAPINS0UserMessageGetConversationsRequest *) [MYSMSAPINS0UserMessageGetConversationsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageGetConversationsRequest;
}

//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 MYSMSAPINS0UserMessageGetConversationsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageGetConversationsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageGetConversationsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageGetConversationsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageGetConversationsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageGetConversationsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageGetConversationsRequest *_mYSMSAPINS0UserMessageGetConversationsRequest = [[MYSMSAPINS0UserMessageGetConversationsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageGetConversationsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageGetConversationsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageGetConversationsRequest autorelease];
  return _mYSMSAPINS0UserMessageGetConversationsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageGetConversationsRequest 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 MYSMSAPINS0UserMessageGetConversationsRequest 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 MYSMSAPINS0UserMessageGetConversationsRequest from an XML reader. The element to be read is
 * "userMessageGetConversationsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageGetConversationsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageGetConversationsRequest *_userMessageGetConversationsRequest = 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 userMessageGetConversationsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageGetConversationsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageGetConversationsRequest.");
#endif
    _userMessageGetConversationsRequest = (MYSMSAPINS0UserMessageGetConversationsRequest *)[MYSMSAPINS0UserMessageGetConversationsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageGetConversationsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetConversationsRequest. Expected element userMessageGetConversationsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetConversationsRequest. Expected element userMessageGetConversationsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageGetConversationsRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageGetConversationsRequest to XML under element name "userMessageGetConversationsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageGetConversationsRequest The UserMessageGetConversationsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageGetConversationsRequest 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 "userMessageGetConversationsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageGetConversationsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageGetConversationsRequest for root element {}userMessageGetConversationsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageGetConversationsRequest for root element {}userMessageGetConversationsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageGetConversationsRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserMessageGetConversationsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageGetConversationsRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageInsertRequest_M
#define DEF_MYSMSAPINS0UserMessageInsertRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageInsertRequest

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the message in international format (+4367612345678), for short codes (6567)  or plain text for alphanumeric sender addresses.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The message text of the message.
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message text of the message.
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

- (void) dealloc
{
  [self setAddress: nil];
  [self setMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageInsertRequest *_mYSMSAPINS0UserMessageInsertRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageInsertRequest = (MYSMSAPINS0UserMessageInsertRequest *) [MYSMSAPINS0UserMessageInsertRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageInsertRequest;
}

//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 MYSMSAPINS0UserMessageInsertRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageInsertRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageInsertRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageInsertRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageInsertRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageInsertRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageInsertRequest *_mYSMSAPINS0UserMessageInsertRequest = [[MYSMSAPINS0UserMessageInsertRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageInsertRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageInsertRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageInsertRequest autorelease];
  return _mYSMSAPINS0UserMessageInsertRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageInsertRequest 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 MYSMSAPINS0UserMessageInsertRequest 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 MYSMSAPINS0UserMessageInsertRequest from an XML reader. The element to be read is
 * "userMessageInsertRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageInsertRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageInsertRequest *_userMessageInsertRequest = 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 userMessageInsertRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageInsertRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageInsertRequest.");
#endif
    _userMessageInsertRequest = (MYSMSAPINS0UserMessageInsertRequest *)[MYSMSAPINS0UserMessageInsertRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageInsertRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageInsertRequest. Expected element userMessageInsertRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageInsertRequest. Expected element userMessageInsertRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageInsertRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageInsertRequest to XML under element name "userMessageInsertRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageInsertRequest The UserMessageInsertRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageInsertRequest 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 "userMessageInsertRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageInsertRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageInsertRequest for root element {}userMessageInsertRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageInsertRequest for root element {}userMessageInsertRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageInsertRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageInsertRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageInsertRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageReadConversationRequest_M
#define DEF_MYSMSAPINS0UserMessageReadConversationRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageReadConversationRequest

/**
 * The address of the conversation which should be marked as read.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the conversation which should be marked as read.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

- (void) dealloc
{
  [self setAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageReadConversationRequest *_mYSMSAPINS0UserMessageReadConversationRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageReadConversationRequest = (MYSMSAPINS0UserMessageReadConversationRequest *) [MYSMSAPINS0UserMessageReadConversationRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageReadConversationRequest;
}

//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 MYSMSAPINS0UserMessageReadConversationRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageReadConversationRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageReadConversationRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageReadConversationRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageReadConversationRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageReadConversationRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageReadConversationRequest *_mYSMSAPINS0UserMessageReadConversationRequest = [[MYSMSAPINS0UserMessageReadConversationRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageReadConversationRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageReadConversationRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageReadConversationRequest autorelease];
  return _mYSMSAPINS0UserMessageReadConversationRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageReadConversationRequest 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 MYSMSAPINS0UserMessageReadConversationRequest 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 MYSMSAPINS0UserMessageReadConversationRequest from an XML reader. The element to be read is
 * "userMessageReadConversationRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageReadConversationRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageReadConversationRequest *_userMessageReadConversationRequest = 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 userMessageReadConversationRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageReadConversationRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageReadConversationRequest.");
#endif
    _userMessageReadConversationRequest = (MYSMSAPINS0UserMessageReadConversationRequest *)[MYSMSAPINS0UserMessageReadConversationRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageReadConversationRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageReadConversationRequest. Expected element userMessageReadConversationRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageReadConversationRequest. Expected element userMessageReadConversationRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageReadConversationRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageReadConversationRequest to XML under element name "userMessageReadConversationRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageReadConversationRequest The UserMessageReadConversationRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageReadConversationRequest 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 "userMessageReadConversationRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageReadConversationRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageReadConversationRequest for root element {}userMessageReadConversationRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageReadConversationRequest for root element {}userMessageReadConversationRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageReadConversationRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageReadConversationRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageReadConversationRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageSyncRequest_M
#define DEF_MYSMSAPINS0UserMessageSyncRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSyncRequest

/**
 * The registered device id for the device.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * The messages that was modified on the device and needs to be synced to the server.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The messages that was modified on the device and needs to be synced to the server.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of messages synchronized previously from the server.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of messages synchronized previously from the server.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

/**
 * The maximum amount of messages that will be returned from server
 */
- (int) syncLimit
{
  return _syncLimit;
}

/**
 * The maximum amount of messages that will be returned from server
 */
- (void) setSyncLimit: (int) newSyncLimit
{
  _syncLimit = newSyncLimit;
}

/**
 * True if the sync is unreliable (no event for new messages). If not set the value will not change.
 */
- (BOOL *) syncUnreliable
{
  return _syncUnreliable;
}

/**
 * True if the sync is unreliable (no event for new messages). If not set the value will not change.
 */
- (void) setSyncUnreliable: (BOOL *) newSyncUnreliable
{
  if (_syncUnreliable != NULL) {
    free(_syncUnreliable);
  }
  _syncUnreliable = newSyncUnreliable;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (BOOL *) syncInitial
{
  return _syncInitial;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (void) setSyncInitial: (BOOL *) newSyncInitial
{
  if (_syncInitial != NULL) {
    free(_syncInitial);
  }
  _syncInitial = newSyncInitial;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [self setSyncUnreliable: NULL];
  [self setSyncInitial: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSyncRequest *_mYSMSAPINS0UserMessageSyncRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSyncRequest = (MYSMSAPINS0UserMessageSyncRequest *) [MYSMSAPINS0UserMessageSyncRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSyncRequest;
}

//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 MYSMSAPINS0UserMessageSyncRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSyncRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSyncRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSyncRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSyncRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSyncRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSyncRequest *_mYSMSAPINS0UserMessageSyncRequest = [[MYSMSAPINS0UserMessageSyncRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSyncRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSyncRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSyncRequest autorelease];
  return _mYSMSAPINS0UserMessageSyncRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSyncRequest 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 MYSMSAPINS0UserMessageSyncRequest 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 MYSMSAPINS0UserMessageSyncRequest from an XML reader. The element to be read is
 * "userMessageSyncRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSyncRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSyncRequest *_userMessageSyncRequest = 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 userMessageSyncRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSyncRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSyncRequest.");
#endif
    _userMessageSyncRequest = (MYSMSAPINS0UserMessageSyncRequest *)[MYSMSAPINS0UserMessageSyncRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSyncRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSyncRequest. Expected element userMessageSyncRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSyncRequest. Expected element userMessageSyncRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSyncRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageSyncRequest to XML under element name "userMessageSyncRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSyncRequest The UserMessageSyncRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSyncRequest 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 "userMessageSyncRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSyncRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSyncRequest for root element {}userMessageSyncRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSyncRequest for root element {}userMessageSyncRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSyncRequest. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userMessageSync.");
#endif

     __child = [MYSMSAPINS0UserMessageSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userMessageSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userMessageSyncAck.");
#endif

     __child = [MYSMSAPINS0UserMessageSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userMessageSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncLimit", 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 setSyncLimit: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncUnreliable", 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 setSyncUnreliable: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncInitial", 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 setSyncInitial: ((BOOL*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncLimit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncLimit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncLimit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_syncLimit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncLimit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncLimit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncLimit."];
    }
  }
  if ([self syncUnreliable] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncUnreliable", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncUnreliable."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncUnreliable...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self syncUnreliable]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncUnreliable...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncUnreliable."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncUnreliable."];
    }
  }
  if ([self syncInitial] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncInitial", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncInitial."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncInitial...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self syncInitial]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncInitial...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncInitial."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncInitial."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageSyncRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSyncRequest_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest_M
#define DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest *_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest = (MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest *) [MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest;
}

//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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest *_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest = [[MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest autorelease];
  return _mYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest 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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest 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 MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest from an XML reader. The element to be read is
 * "userSmsConnectorGetConnectorsExtendedRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest *_userSmsConnectorGetConnectorsExtendedRequest = 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 userSmsConnectorGetConnectorsExtendedRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSmsConnectorGetConnectorsExtendedRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSmsConnectorGetConnectorsExtendedRequest.");
#endif
    _userSmsConnectorGetConnectorsExtendedRequest = (MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest *)[MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSmsConnectorGetConnectorsExtendedRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest. Expected element userSmsConnectorGetConnectorsExtendedRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest. Expected element userSmsConnectorGetConnectorsExtendedRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSmsConnectorGetConnectorsExtendedRequest;
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest to XML under element name "userSmsConnectorGetConnectorsExtendedRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSmsConnectorGetConnectorsExtendedRequest The UserSmsConnectorGetConnectorsExtendedRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest 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 "userSmsConnectorGetConnectorsExtendedRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSmsConnectorGetConnectorsExtendedRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSmsConnectorGetConnectorsExtendedRequest for root element {}userSmsConnectorGetConnectorsExtendedRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSmsConnectorGetConnectorsExtendedRequest for root element {}userSmsConnectorGetConnectorsExtendedRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSmsConnectorGetConnectorsExtendedRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSmsConnectorGetConnectorsExtendedRequest_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionActivateRequest_M
#define DEF_MYSMSAPINS0UserSubscriptionActivateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionActivateRequest

/**
 * The product id of the subscription
 */
- (int) productId
{
  return _productId;
}

/**
 * The product id of the subscription
 */
- (void) setProductId: (int) newProductId
{
  _productId = newProductId;
}

/**
 * The payment method id used for the payment
 */
- (int) paymentMethodId
{
  return _paymentMethodId;
}

/**
 * The payment method id used for the payment
 */
- (void) setPaymentMethodId: (int) newPaymentMethodId
{
  _paymentMethodId = newPaymentMethodId;
}

/**
 * The payment info's needed to activate the subscription
 */
- (NSString *) paymentInfo
{
  return _paymentInfo;
}

/**
 * The payment info's needed to activate the subscription
 */
- (void) setPaymentInfo: (NSString *) newPaymentInfo
{
  [newPaymentInfo retain];
  [_paymentInfo release];
  _paymentInfo = newPaymentInfo;
}

- (void) dealloc
{
  [self setPaymentInfo: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionActivateRequest *_mYSMSAPINS0UserSubscriptionActivateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionActivateRequest = (MYSMSAPINS0UserSubscriptionActivateRequest *) [MYSMSAPINS0UserSubscriptionActivateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionActivateRequest;
}

//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 MYSMSAPINS0UserSubscriptionActivateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionActivateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionActivateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionActivateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionActivateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionActivateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionActivateRequest *_mYSMSAPINS0UserSubscriptionActivateRequest = [[MYSMSAPINS0UserSubscriptionActivateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionActivateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionActivateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionActivateRequest autorelease];
  return _mYSMSAPINS0UserSubscriptionActivateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionActivateRequest 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 MYSMSAPINS0UserSubscriptionActivateRequest 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 MYSMSAPINS0UserSubscriptionActivateRequest from an XML reader. The element to be read is
 * "userSubscriptionActivateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionActivateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionActivateRequest *_userSubscriptionActivateRequest = 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 userSubscriptionActivateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionActivateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionActivateRequest.");
#endif
    _userSubscriptionActivateRequest = (MYSMSAPINS0UserSubscriptionActivateRequest *)[MYSMSAPINS0UserSubscriptionActivateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionActivateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionActivateRequest. Expected element userSubscriptionActivateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionActivateRequest. Expected element userSubscriptionActivateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionActivateRequest;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionActivateRequest to XML under element name "userSubscriptionActivateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionActivateRequest The UserSubscriptionActivateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionActivateRequest 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 "userSubscriptionActivateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionActivateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionActivateRequest for root element {}userSubscriptionActivateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionActivateRequest for root element {}userSubscriptionActivateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionActivateRequest. 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 "productId", 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 setProductId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "paymentMethodId", 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 setPaymentMethodId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "paymentInfo", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}paymentInfo of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}paymentInfo of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPaymentInfo: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_productId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}productId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethodId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}paymentMethodId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}paymentMethodId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_paymentMethodId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}paymentMethodId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}paymentMethodId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}paymentMethodId."];
    }
  }
  if ([self paymentInfo]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentInfo", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}paymentInfo."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}paymentInfo...");
#endif
    [[self paymentInfo] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}paymentInfo...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}paymentInfo."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSubscriptionActivateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionActivateRequest_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionGetRequest_M
#define DEF_MYSMSAPINS0UserSubscriptionGetRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionGetRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionGetRequest *_mYSMSAPINS0UserSubscriptionGetRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionGetRequest = (MYSMSAPINS0UserSubscriptionGetRequest *) [MYSMSAPINS0UserSubscriptionGetRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionGetRequest;
}

//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 MYSMSAPINS0UserSubscriptionGetRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionGetRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionGetRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionGetRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionGetRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionGetRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionGetRequest *_mYSMSAPINS0UserSubscriptionGetRequest = [[MYSMSAPINS0UserSubscriptionGetRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionGetRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionGetRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionGetRequest autorelease];
  return _mYSMSAPINS0UserSubscriptionGetRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionGetRequest 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 MYSMSAPINS0UserSubscriptionGetRequest 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 MYSMSAPINS0UserSubscriptionGetRequest from an XML reader. The element to be read is
 * "userSubscriptionGetRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionGetRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionGetRequest *_userSubscriptionGetRequest = 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 userSubscriptionGetRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionGetRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionGetRequest.");
#endif
    _userSubscriptionGetRequest = (MYSMSAPINS0UserSubscriptionGetRequest *)[MYSMSAPINS0UserSubscriptionGetRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionGetRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionGetRequest. Expected element userSubscriptionGetRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionGetRequest. Expected element userSubscriptionGetRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionGetRequest;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionGetRequest to XML under element name "userSubscriptionGetRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionGetRequest The UserSubscriptionGetRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionGetRequest 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 "userSubscriptionGetRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionGetRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionGetRequest for root element {}userSubscriptionGetRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionGetRequest for root element {}userSubscriptionGetRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionGetRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionGetRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionGetRequest_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionLogRequest_M
#define DEF_MYSMSAPINS0UserSubscriptionLogRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionLogRequest

/**
 * The product id of the subscription
 */
- (int) productId
{
  return _productId;
}

/**
 * The product id of the subscription
 */
- (void) setProductId: (int) newProductId
{
  _productId = newProductId;
}

/**
 * The payment method id of the subscription
 */
- (int) paymentMethodId
{
  return _paymentMethodId;
}

/**
 * The payment method id of the subscription
 */
- (void) setPaymentMethodId: (int) newPaymentMethodId
{
  _paymentMethodId = newPaymentMethodId;
}

/**
 * The event id to log
 * 
 * 0 .. back clicked
 * 1 .. later clicked
 * 2 .. try + later clicked
 * 3 .. try clicked
 */
- (int) eventId
{
  return _eventId;
}

/**
 * The event id to log
 * 
 * 0 .. back clicked
 * 1 .. later clicked
 * 2 .. try + later clicked
 * 3 .. try clicked
 */
- (void) setEventId: (int) newEventId
{
  _eventId = newEventId;
}

/**
 * The source from where the subscription was called
 */
- (NSString *) source
{
  return _source;
}

/**
 * The source from where the subscription was called
 */
- (void) setSource: (NSString *) newSource
{
  [newSource retain];
  [_source release];
  _source = newSource;
}

- (void) dealloc
{
  [self setSource: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionLogRequest *_mYSMSAPINS0UserSubscriptionLogRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionLogRequest = (MYSMSAPINS0UserSubscriptionLogRequest *) [MYSMSAPINS0UserSubscriptionLogRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionLogRequest;
}

//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 MYSMSAPINS0UserSubscriptionLogRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionLogRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionLogRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionLogRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionLogRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionLogRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionLogRequest *_mYSMSAPINS0UserSubscriptionLogRequest = [[MYSMSAPINS0UserSubscriptionLogRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionLogRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionLogRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionLogRequest autorelease];
  return _mYSMSAPINS0UserSubscriptionLogRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionLogRequest 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 MYSMSAPINS0UserSubscriptionLogRequest 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 MYSMSAPINS0UserSubscriptionLogRequest from an XML reader. The element to be read is
 * "userSubscriptionLogRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionLogRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionLogRequest *_userSubscriptionLogRequest = 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 userSubscriptionLogRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionLogRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionLogRequest.");
#endif
    _userSubscriptionLogRequest = (MYSMSAPINS0UserSubscriptionLogRequest *)[MYSMSAPINS0UserSubscriptionLogRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionLogRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLogRequest. Expected element userSubscriptionLogRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLogRequest. Expected element userSubscriptionLogRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionLogRequest;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLogRequest to XML under element name "userSubscriptionLogRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionLogRequest The UserSubscriptionLogRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLogRequest 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 "userSubscriptionLogRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionLogRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionLogRequest for root element {}userSubscriptionLogRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionLogRequest for root element {}userSubscriptionLogRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionLogRequest. 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 "productId", 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 setProductId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "paymentMethodId", 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 setPaymentMethodId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "eventId", 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 setEventId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "source", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}source of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}source of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSource: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_productId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}productId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethodId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}paymentMethodId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}paymentMethodId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_paymentMethodId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}paymentMethodId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}paymentMethodId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}paymentMethodId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "eventId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}eventId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}eventId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_eventId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}eventId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}eventId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}eventId."];
    }
  }
  if ([self source]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "source", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}source."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}source...");
#endif
    [[self source] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}source...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}source."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSubscriptionLogRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionLogRequest_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionLaunchRequest_M
#define DEF_MYSMSAPINS0UserSubscriptionLaunchRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionLaunchRequest

/**
 * The feature id which needs a subscription
 * <p/>
 * 0 .. remote call
 * 1 .. mirror
 * 3 .. integration (evernote, google drive, dropbox, ...)
 * 4 .. history
 * 5 .. schedule
 */
- (int) featureId
{
  return _featureId;
}

/**
 * The feature id which needs a subscription
 * <p/>
 * 0 .. remote call
 * 1 .. mirror
 * 3 .. integration (evernote, google drive, dropbox, ...)
 * 4 .. history
 * 5 .. schedule
 */
- (void) setFeatureId: (int) newFeatureId
{
  _featureId = newFeatureId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionLaunchRequest *_mYSMSAPINS0UserSubscriptionLaunchRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionLaunchRequest = (MYSMSAPINS0UserSubscriptionLaunchRequest *) [MYSMSAPINS0UserSubscriptionLaunchRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionLaunchRequest;
}

//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 MYSMSAPINS0UserSubscriptionLaunchRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionLaunchRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionLaunchRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionLaunchRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionLaunchRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionLaunchRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionLaunchRequest *_mYSMSAPINS0UserSubscriptionLaunchRequest = [[MYSMSAPINS0UserSubscriptionLaunchRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionLaunchRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionLaunchRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionLaunchRequest autorelease];
  return _mYSMSAPINS0UserSubscriptionLaunchRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionLaunchRequest 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 MYSMSAPINS0UserSubscriptionLaunchRequest 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 MYSMSAPINS0UserSubscriptionLaunchRequest from an XML reader. The element to be read is
 * "userSubscriptionLaunchRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionLaunchRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionLaunchRequest *_userSubscriptionLaunchRequest = 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 userSubscriptionLaunchRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionLaunchRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionLaunchRequest.");
#endif
    _userSubscriptionLaunchRequest = (MYSMSAPINS0UserSubscriptionLaunchRequest *)[MYSMSAPINS0UserSubscriptionLaunchRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionLaunchRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLaunchRequest. Expected element userSubscriptionLaunchRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionLaunchRequest. Expected element userSubscriptionLaunchRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionLaunchRequest;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLaunchRequest to XML under element name "userSubscriptionLaunchRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionLaunchRequest The UserSubscriptionLaunchRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionLaunchRequest 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 "userSubscriptionLaunchRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionLaunchRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionLaunchRequest for root element {}userSubscriptionLaunchRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionLaunchRequest for root element {}userSubscriptionLaunchRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionLaunchRequest. 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 "featureId", 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 setFeatureId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "featureId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}featureId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}featureId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_featureId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}featureId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}featureId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}featureId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSubscriptionLaunchRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionLaunchRequest_M */
#ifndef DEF_MYSMSAPINS0UserSubscriptionDeactivateRequest_M
#define DEF_MYSMSAPINS0UserSubscriptionDeactivateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSubscriptionDeactivateRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSubscriptionDeactivateRequest *_mYSMSAPINS0UserSubscriptionDeactivateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSubscriptionDeactivateRequest = (MYSMSAPINS0UserSubscriptionDeactivateRequest *) [MYSMSAPINS0UserSubscriptionDeactivateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSubscriptionDeactivateRequest;
}

//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 MYSMSAPINS0UserSubscriptionDeactivateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSubscriptionDeactivateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSubscriptionDeactivateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSubscriptionDeactivateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSubscriptionDeactivateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSubscriptionDeactivateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSubscriptionDeactivateRequest *_mYSMSAPINS0UserSubscriptionDeactivateRequest = [[MYSMSAPINS0UserSubscriptionDeactivateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSubscriptionDeactivateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSubscriptionDeactivateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSubscriptionDeactivateRequest autorelease];
  return _mYSMSAPINS0UserSubscriptionDeactivateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSubscriptionDeactivateRequest 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 MYSMSAPINS0UserSubscriptionDeactivateRequest 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 MYSMSAPINS0UserSubscriptionDeactivateRequest from an XML reader. The element to be read is
 * "userSubscriptionDeactivateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSubscriptionDeactivateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSubscriptionDeactivateRequest *_userSubscriptionDeactivateRequest = 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 userSubscriptionDeactivateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSubscriptionDeactivateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSubscriptionDeactivateRequest.");
#endif
    _userSubscriptionDeactivateRequest = (MYSMSAPINS0UserSubscriptionDeactivateRequest *)[MYSMSAPINS0UserSubscriptionDeactivateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSubscriptionDeactivateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionDeactivateRequest. Expected element userSubscriptionDeactivateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSubscriptionDeactivateRequest. Expected element userSubscriptionDeactivateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSubscriptionDeactivateRequest;
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionDeactivateRequest to XML under element name "userSubscriptionDeactivateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSubscriptionDeactivateRequest The UserSubscriptionDeactivateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSubscriptionDeactivateRequest 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 "userSubscriptionDeactivateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSubscriptionDeactivateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSubscriptionDeactivateRequest for root element {}userSubscriptionDeactivateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSubscriptionDeactivateRequest for root element {}userSubscriptionDeactivateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSubscriptionDeactivateRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserSubscriptionDeactivateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSubscriptionDeactivateRequest_M */
#ifndef DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsRequest_M
#define DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSmsConnectorSetConnectorsRequest

/**
 * The list of sms connectors the user has installed on his device with the order he has choosen.
 */
- (NSArray *) connectors
{
  return _connectors;
}

/**
 * The list of sms connectors the user has installed on his device with the order he has choosen.
 */
- (void) setConnectors: (NSArray *) newConnectors
{
  [newConnectors retain];
  [_connectors release];
  _connectors = newConnectors;
}

- (void) dealloc
{
  [self setConnectors: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSmsConnectorSetConnectorsRequest *_mYSMSAPINS0UserSmsConnectorSetConnectorsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSmsConnectorSetConnectorsRequest = (MYSMSAPINS0UserSmsConnectorSetConnectorsRequest *) [MYSMSAPINS0UserSmsConnectorSetConnectorsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSmsConnectorSetConnectorsRequest;
}

//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 MYSMSAPINS0UserSmsConnectorSetConnectorsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSmsConnectorSetConnectorsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSmsConnectorSetConnectorsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSmsConnectorSetConnectorsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSmsConnectorSetConnectorsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSmsConnectorSetConnectorsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSmsConnectorSetConnectorsRequest *_mYSMSAPINS0UserSmsConnectorSetConnectorsRequest = [[MYSMSAPINS0UserSmsConnectorSetConnectorsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSmsConnectorSetConnectorsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSmsConnectorSetConnectorsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSmsConnectorSetConnectorsRequest autorelease];
  return _mYSMSAPINS0UserSmsConnectorSetConnectorsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSmsConnectorSetConnectorsRequest 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 MYSMSAPINS0UserSmsConnectorSetConnectorsRequest 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 MYSMSAPINS0UserSmsConnectorSetConnectorsRequest from an XML reader. The element to be read is
 * "userSmsConnectorSetConnectorsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSmsConnectorSetConnectorsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSmsConnectorSetConnectorsRequest *_userSmsConnectorSetConnectorsRequest = 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 userSmsConnectorSetConnectorsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSmsConnectorSetConnectorsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSmsConnectorSetConnectorsRequest.");
#endif
    _userSmsConnectorSetConnectorsRequest = (MYSMSAPINS0UserSmsConnectorSetConnectorsRequest *)[MYSMSAPINS0UserSmsConnectorSetConnectorsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSmsConnectorSetConnectorsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorSetConnectorsRequest. Expected element userSmsConnectorSetConnectorsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSmsConnectorSetConnectorsRequest. Expected element userSmsConnectorSetConnectorsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSmsConnectorSetConnectorsRequest;
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorSetConnectorsRequest to XML under element name "userSmsConnectorSetConnectorsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSmsConnectorSetConnectorsRequest The UserSmsConnectorSetConnectorsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSmsConnectorSetConnectorsRequest 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 "userSmsConnectorSetConnectorsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSmsConnectorSetConnectorsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSmsConnectorSetConnectorsRequest for root element {}userSmsConnectorSetConnectorsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSmsConnectorSetConnectorsRequest for root element {}userSmsConnectorSetConnectorsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSmsConnectorSetConnectorsRequest. 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 "connectors", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}connectors of type {}userSmsConnector.");
#endif

     __child = [MYSMSAPINS0UserSmsConnector readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}connectors of type {}userSmsConnector.");
#endif

    if ([self connectors]) {
      [self setConnectors: [[self connectors] arrayByAddingObject: __child]];
    }
    else {
      [self setConnectors: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self connectors]) {
    __enumerator = [[self connectors] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "connectors", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}connectors."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}connectors...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}connectors...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}connectors."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserSmsConnectorSetConnectorsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSmsConnectorSetConnectorsRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageUpdateRequest_M
#define DEF_MYSMSAPINS0UserMessageUpdateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageUpdateRequest

/**
 * The message id of the message which should be updated.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The message id of the message which should be updated.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

/**
 * True if the message was already read otherwise the message is marked unread.
 */
- (BOOL *) read
{
  return _read;
}

/**
 * True if the message was already read otherwise the message is marked unread.
 */
- (void) setRead: (BOOL *) newRead
{
  if (_read != NULL) {
    free(_read);
  }
  _read = newRead;
}

/**
 * True if the message should be marked as locked read otherwise the message is marked unlocked.
 */
- (BOOL *) locked
{
  return _locked;
}

/**
 * True if the message should be marked as locked read otherwise the message is marked unlocked.
 */
- (void) setLocked: (BOOL *) newLocked
{
  if (_locked != NULL) {
    free(_locked);
  }
  _locked = newLocked;
}

- (void) dealloc
{
  [self setRead: NULL];
  [self setLocked: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageUpdateRequest *_mYSMSAPINS0UserMessageUpdateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageUpdateRequest = (MYSMSAPINS0UserMessageUpdateRequest *) [MYSMSAPINS0UserMessageUpdateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageUpdateRequest;
}

//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 MYSMSAPINS0UserMessageUpdateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageUpdateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageUpdateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageUpdateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageUpdateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageUpdateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageUpdateRequest *_mYSMSAPINS0UserMessageUpdateRequest = [[MYSMSAPINS0UserMessageUpdateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageUpdateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageUpdateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageUpdateRequest autorelease];
  return _mYSMSAPINS0UserMessageUpdateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageUpdateRequest 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 MYSMSAPINS0UserMessageUpdateRequest 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 MYSMSAPINS0UserMessageUpdateRequest from an XML reader. The element to be read is
 * "userMessageUpdateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageUpdateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageUpdateRequest *_userMessageUpdateRequest = 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 userMessageUpdateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageUpdateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageUpdateRequest.");
#endif
    _userMessageUpdateRequest = (MYSMSAPINS0UserMessageUpdateRequest *)[MYSMSAPINS0UserMessageUpdateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageUpdateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUpdateRequest. Expected element userMessageUpdateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUpdateRequest. Expected element userMessageUpdateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageUpdateRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageUpdateRequest to XML under element name "userMessageUpdateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageUpdateRequest The UserMessageUpdateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageUpdateRequest 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 "userMessageUpdateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageUpdateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageUpdateRequest for root element {}userMessageUpdateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageUpdateRequest for root element {}userMessageUpdateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageUpdateRequest. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "read", 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 setRead: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "locked", 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 setLocked: ((BOOL*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
  if ([self read] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "read", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}read."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}read...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self read]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}read...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}read."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}read."];
    }
  }
  if ([self locked] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "locked", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}locked."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}locked...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self locked]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}locked...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}locked."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}locked."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageUpdateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageUpdateRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageUnlockListRequest_M
#define DEF_MYSMSAPINS0UserMessageUnlockListRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageUnlockListRequest

/**
 * The message ids of the messages which should be locked.
 */
- (NSArray *) messageIds
{
  return _messageIds;
}

/**
 * The message ids of the messages which should be locked.
 */
- (void) setMessageIds: (NSArray *) newMessageIds
{
  [newMessageIds retain];
  [_messageIds release];
  _messageIds = newMessageIds;
}

- (void) dealloc
{
  [self setMessageIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageUnlockListRequest *_mYSMSAPINS0UserMessageUnlockListRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageUnlockListRequest = (MYSMSAPINS0UserMessageUnlockListRequest *) [MYSMSAPINS0UserMessageUnlockListRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageUnlockListRequest;
}

//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 MYSMSAPINS0UserMessageUnlockListRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageUnlockListRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageUnlockListRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageUnlockListRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageUnlockListRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageUnlockListRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageUnlockListRequest *_mYSMSAPINS0UserMessageUnlockListRequest = [[MYSMSAPINS0UserMessageUnlockListRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageUnlockListRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageUnlockListRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageUnlockListRequest autorelease];
  return _mYSMSAPINS0UserMessageUnlockListRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageUnlockListRequest 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 MYSMSAPINS0UserMessageUnlockListRequest 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 MYSMSAPINS0UserMessageUnlockListRequest from an XML reader. The element to be read is
 * "userMessageUnlockListRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageUnlockListRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageUnlockListRequest *_userMessageUnlockListRequest = 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 userMessageUnlockListRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageUnlockListRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageUnlockListRequest.");
#endif
    _userMessageUnlockListRequest = (MYSMSAPINS0UserMessageUnlockListRequest *)[MYSMSAPINS0UserMessageUnlockListRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageUnlockListRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUnlockListRequest. Expected element userMessageUnlockListRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageUnlockListRequest. Expected element userMessageUnlockListRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageUnlockListRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageUnlockListRequest to XML under element name "userMessageUnlockListRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageUnlockListRequest The UserMessageUnlockListRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageUnlockListRequest 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 "userMessageUnlockListRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageUnlockListRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageUnlockListRequest for root element {}userMessageUnlockListRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageUnlockListRequest for root element {}userMessageUnlockListRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageUnlockListRequest. 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 "messageIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    _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."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(int)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    if ([self messageIds]) {
      [self setMessageIds: [[self messageIds] arrayByAddingObject: __child]];
    }
    else {
      [self setMessageIds: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self messageIds]) {
    __enumerator = [[self messageIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}messageIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}messageIds...");
#endif
      status = xmlTextWriterWriteIntType(writer, ((int*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}messageIds."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}messageIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}messageIds."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageUnlockListRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageUnlockListRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageSendRequest_M
#define DEF_MYSMSAPINS0UserMessageSendRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSendRequest

/**
 * The msisdn of the recipient.
 */
- (long long) recipient
{
  return _recipient;
}

/**
 * The msisdn of the recipient.
 */
- (void) setRecipient: (long long) newRecipient
{
  _recipient = newRecipient;
}

/**
 * The message to send
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (NSDate *) dateSendOn
{
  return _dateSendOn;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (void) setDateSendOn: (NSDate *) newDateSendOn
{
  [newDateSendOn retain];
  [_dateSendOn release];
  _dateSendOn = newDateSendOn;
}

/**
 * This isn't used anymore.
 */
- (BOOL) instantOnly
{
  return _instantOnly;
}

/**
 * This isn't used anymore.
 */
- (void) setInstantOnly: (BOOL) newInstantOnly
{
  _instantOnly = newInstantOnly;
}

/**
 * The registered device id for the device if their is one.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device if their is one.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

- (void) dealloc
{
  [self setMessage: nil];
  [self setDateSendOn: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSendRequest *_mYSMSAPINS0UserMessageSendRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSendRequest = (MYSMSAPINS0UserMessageSendRequest *) [MYSMSAPINS0UserMessageSendRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSendRequest;
}

//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 MYSMSAPINS0UserMessageSendRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSendRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSendRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSendRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSendRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSendRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSendRequest *_mYSMSAPINS0UserMessageSendRequest = [[MYSMSAPINS0UserMessageSendRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSendRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSendRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSendRequest autorelease];
  return _mYSMSAPINS0UserMessageSendRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSendRequest 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 MYSMSAPINS0UserMessageSendRequest 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 MYSMSAPINS0UserMessageSendRequest from an XML reader. The element to be read is
 * "userMessageSendRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSendRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSendRequest *_userMessageSendRequest = 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 userMessageSendRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSendRequest.");
#endif
    _userMessageSendRequest = (MYSMSAPINS0UserMessageSendRequest *)[MYSMSAPINS0UserMessageSendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSendRequest. Expected element userMessageSendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSendRequest. Expected element userMessageSendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSendRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageSendRequest to XML under element name "userMessageSendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSendRequest The UserMessageSendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSendRequest 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 "userMessageSendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSendRequest for root element {}userMessageSendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSendRequest for root element {}userMessageSendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSendRequest. 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 "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRecipient: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSendOn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSendOn: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "instantOnly", 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 setInstantOnly: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipient."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}recipient...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_recipient);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}recipient...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}recipient."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if ([self dateSendOn]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSendOn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSendOn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSendOn...");
#endif
    [[self dateSendOn] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSendOn...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSendOn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "instantOnly", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}instantOnly."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}instantOnly...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_instantOnly);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}instantOnly...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}instantOnly."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}instantOnly."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageSendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSendRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageSearchRequest_M
#define DEF_MYSMSAPINS0UserMessageSearchRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageSearchRequest

/**
 * The query string.
 * 
 * i.e: Hello -tom
 */
- (NSString *) query
{
  return _query;
}

/**
 * The query string.
 * 
 * i.e: Hello -tom
 */
- (void) setQuery: (NSString *) newQuery
{
  [newQuery retain];
  [_query release];
  _query = newQuery;
}

/**
 * The optional address of the conversation.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The optional address of the conversation.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * If true only locked messages will be searched.
 */
- (BOOL) locked
{
  return _locked;
}

/**
 * If true only locked messages will be searched.
 */
- (void) setLocked: (BOOL) newLocked
{
  _locked = newLocked;
}

/**
 * The limit of the search.
 */
- (int) limit
{
  return _limit;
}

/**
 * The limit of the search.
 */
- (void) setLimit: (int) newLimit
{
  _limit = newLimit;
}

- (void) dealloc
{
  [self setQuery: nil];
  [self setAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageSearchRequest *_mYSMSAPINS0UserMessageSearchRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageSearchRequest = (MYSMSAPINS0UserMessageSearchRequest *) [MYSMSAPINS0UserMessageSearchRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageSearchRequest;
}

//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 MYSMSAPINS0UserMessageSearchRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageSearchRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageSearchRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageSearchRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageSearchRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageSearchRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageSearchRequest *_mYSMSAPINS0UserMessageSearchRequest = [[MYSMSAPINS0UserMessageSearchRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageSearchRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageSearchRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageSearchRequest autorelease];
  return _mYSMSAPINS0UserMessageSearchRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageSearchRequest 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 MYSMSAPINS0UserMessageSearchRequest 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 MYSMSAPINS0UserMessageSearchRequest from an XML reader. The element to be read is
 * "userMessageSearchRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageSearchRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageSearchRequest *_userMessageSearchRequest = 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 userMessageSearchRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageSearchRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageSearchRequest.");
#endif
    _userMessageSearchRequest = (MYSMSAPINS0UserMessageSearchRequest *)[MYSMSAPINS0UserMessageSearchRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageSearchRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSearchRequest. Expected element userMessageSearchRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageSearchRequest. Expected element userMessageSearchRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageSearchRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageSearchRequest to XML under element name "userMessageSearchRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageSearchRequest The UserMessageSearchRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageSearchRequest 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 "userMessageSearchRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageSearchRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageSearchRequest for root element {}userMessageSearchRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageSearchRequest for root element {}userMessageSearchRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageSearchRequest. 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 "query", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}query of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}query of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setQuery: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "locked", 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 setLocked: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "limit", 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 setLimit: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self query]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "query", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}query."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}query...");
#endif
    [[self query] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}query...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}query."];
    }
  }
  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "locked", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}locked."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}locked...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_locked);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}locked...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}locked."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}locked."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "limit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}limit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}limit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_limit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}limit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}limit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}limit."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageSearchRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageSearchRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageLockListRequest_M
#define DEF_MYSMSAPINS0UserMessageLockListRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageLockListRequest

/**
 * The message ids of the messages which should be locked.
 */
- (NSArray *) messageIds
{
  return _messageIds;
}

/**
 * The message ids of the messages which should be locked.
 */
- (void) setMessageIds: (NSArray *) newMessageIds
{
  [newMessageIds retain];
  [_messageIds release];
  _messageIds = newMessageIds;
}

- (void) dealloc
{
  [self setMessageIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageLockListRequest *_mYSMSAPINS0UserMessageLockListRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageLockListRequest = (MYSMSAPINS0UserMessageLockListRequest *) [MYSMSAPINS0UserMessageLockListRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageLockListRequest;
}

//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 MYSMSAPINS0UserMessageLockListRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageLockListRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageLockListRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageLockListRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageLockListRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageLockListRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageLockListRequest *_mYSMSAPINS0UserMessageLockListRequest = [[MYSMSAPINS0UserMessageLockListRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageLockListRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageLockListRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageLockListRequest autorelease];
  return _mYSMSAPINS0UserMessageLockListRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageLockListRequest 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 MYSMSAPINS0UserMessageLockListRequest 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 MYSMSAPINS0UserMessageLockListRequest from an XML reader. The element to be read is
 * "userMessageLockListRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageLockListRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageLockListRequest *_userMessageLockListRequest = 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 userMessageLockListRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageLockListRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageLockListRequest.");
#endif
    _userMessageLockListRequest = (MYSMSAPINS0UserMessageLockListRequest *)[MYSMSAPINS0UserMessageLockListRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageLockListRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageLockListRequest. Expected element userMessageLockListRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageLockListRequest. Expected element userMessageLockListRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageLockListRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageLockListRequest to XML under element name "userMessageLockListRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageLockListRequest The UserMessageLockListRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageLockListRequest 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 "userMessageLockListRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageLockListRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageLockListRequest for root element {}userMessageLockListRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageLockListRequest for root element {}userMessageLockListRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageLockListRequest. 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 "messageIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    _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."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(int)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}messageIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    if ([self messageIds]) {
      [self setMessageIds: [[self messageIds] arrayByAddingObject: __child]];
    }
    else {
      [self setMessageIds: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self messageIds]) {
    __enumerator = [[self messageIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}messageIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}messageIds...");
#endif
      status = xmlTextWriterWriteIntType(writer, ((int*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}messageIds."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}messageIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}messageIds."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0UserMessageLockListRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageLockListRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageGetMessagesRequest_M
#define DEF_MYSMSAPINS0UserMessageGetMessagesRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageGetMessagesRequest

/**
 * The address of the conversation.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the conversation.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

/**
 * The offset of the user message list.
 */
- (int) offset
{
  return _offset;
}

/**
 * The offset of the user message list.
 */
- (void) setOffset: (int) newOffset
{
  _offset = newOffset;
}

/**
 * The limit of the user message list.
 */
- (int) limit
{
  return _limit;
}

/**
 * The limit of the user message list.
 */
- (void) setLimit: (int) newLimit
{
  _limit = newLimit;
}

- (void) dealloc
{
  [self setAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageGetMessagesRequest *_mYSMSAPINS0UserMessageGetMessagesRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageGetMessagesRequest = (MYSMSAPINS0UserMessageGetMessagesRequest *) [MYSMSAPINS0UserMessageGetMessagesRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageGetMessagesRequest;
}

//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 MYSMSAPINS0UserMessageGetMessagesRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageGetMessagesRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageGetMessagesRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageGetMessagesRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageGetMessagesRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageGetMessagesRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageGetMessagesRequest *_mYSMSAPINS0UserMessageGetMessagesRequest = [[MYSMSAPINS0UserMessageGetMessagesRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageGetMessagesRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageGetMessagesRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageGetMessagesRequest autorelease];
  return _mYSMSAPINS0UserMessageGetMessagesRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageGetMessagesRequest 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 MYSMSAPINS0UserMessageGetMessagesRequest 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 MYSMSAPINS0UserMessageGetMessagesRequest from an XML reader. The element to be read is
 * "userMessageGetMessagesRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageGetMessagesRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageGetMessagesRequest *_userMessageGetMessagesRequest = 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 userMessageGetMessagesRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageGetMessagesRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageGetMessagesRequest.");
#endif
    _userMessageGetMessagesRequest = (MYSMSAPINS0UserMessageGetMessagesRequest *)[MYSMSAPINS0UserMessageGetMessagesRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageGetMessagesRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetMessagesRequest. Expected element userMessageGetMessagesRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageGetMessagesRequest. Expected element userMessageGetMessagesRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageGetMessagesRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageGetMessagesRequest to XML under element name "userMessageGetMessagesRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageGetMessagesRequest The UserMessageGetMessagesRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageGetMessagesRequest 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 "userMessageGetMessagesRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageGetMessagesRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageGetMessagesRequest for root element {}userMessageGetMessagesRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageGetMessagesRequest for root element {}userMessageGetMessagesRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageGetMessagesRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "offset", 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 setOffset: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "limit", 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 setLimit: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offset", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}offset."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}offset...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_offset);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}offset...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}offset."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}offset."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "limit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}limit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}limit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_limit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}limit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}limit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}limit."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageGetMessagesRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageGetMessagesRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteRequest_M
#define DEF_MYSMSAPINS0UserMessageDeleteRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteRequest

/**
 * The message id of the message which should be deleted.
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The message id of the message which should be deleted.
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteRequest *_mYSMSAPINS0UserMessageDeleteRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteRequest = (MYSMSAPINS0UserMessageDeleteRequest *) [MYSMSAPINS0UserMessageDeleteRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteRequest;
}

//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 MYSMSAPINS0UserMessageDeleteRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteRequest *_mYSMSAPINS0UserMessageDeleteRequest = [[MYSMSAPINS0UserMessageDeleteRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteRequest autorelease];
  return _mYSMSAPINS0UserMessageDeleteRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteRequest 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 MYSMSAPINS0UserMessageDeleteRequest 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 MYSMSAPINS0UserMessageDeleteRequest from an XML reader. The element to be read is
 * "userMessageDeleteRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteRequest *_userMessageDeleteRequest = 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 userMessageDeleteRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteRequest.");
#endif
    _userMessageDeleteRequest = (MYSMSAPINS0UserMessageDeleteRequest *)[MYSMSAPINS0UserMessageDeleteRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteRequest. Expected element userMessageDeleteRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteRequest. Expected element userMessageDeleteRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteRequest to XML under element name "userMessageDeleteRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteRequest The UserMessageDeleteRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteRequest 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 "userMessageDeleteRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteRequest for root element {}userMessageDeleteRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteRequest for root element {}userMessageDeleteRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteRequest. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageDeleteRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteRequest_M */
#ifndef DEF_MYSMSAPINS0UserMessageDeleteConversationRequest_M
#define DEF_MYSMSAPINS0UserMessageDeleteConversationRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationRequest

/**
 * The address of the conversation which should be deleted.
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address of the conversation which should be deleted.
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

- (void) dealloc
{
  [self setAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserMessageDeleteConversationRequest *_mYSMSAPINS0UserMessageDeleteConversationRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserMessageDeleteConversationRequest = (MYSMSAPINS0UserMessageDeleteConversationRequest *) [MYSMSAPINS0UserMessageDeleteConversationRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserMessageDeleteConversationRequest;
}

//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 MYSMSAPINS0UserMessageDeleteConversationRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserMessageDeleteConversationRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserMessageDeleteConversationRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserMessageDeleteConversationRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserMessageDeleteConversationRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserMessageDeleteConversationRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserMessageDeleteConversationRequest *_mYSMSAPINS0UserMessageDeleteConversationRequest = [[MYSMSAPINS0UserMessageDeleteConversationRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserMessageDeleteConversationRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserMessageDeleteConversationRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserMessageDeleteConversationRequest autorelease];
  return _mYSMSAPINS0UserMessageDeleteConversationRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserMessageDeleteConversationRequest 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 MYSMSAPINS0UserMessageDeleteConversationRequest 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 MYSMSAPINS0UserMessageDeleteConversationRequest from an XML reader. The element to be read is
 * "userMessageDeleteConversationRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserMessageDeleteConversationRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserMessageDeleteConversationRequest *_userMessageDeleteConversationRequest = 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 userMessageDeleteConversationRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userMessageDeleteConversationRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userMessageDeleteConversationRequest.");
#endif
    _userMessageDeleteConversationRequest = (MYSMSAPINS0UserMessageDeleteConversationRequest *)[MYSMSAPINS0UserMessageDeleteConversationRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userMessageDeleteConversationRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationRequest. Expected element userMessageDeleteConversationRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserMessageDeleteConversationRequest. Expected element userMessageDeleteConversationRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userMessageDeleteConversationRequest;
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationRequest to XML under element name "userMessageDeleteConversationRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userMessageDeleteConversationRequest The UserMessageDeleteConversationRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserMessageDeleteConversationRequest 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 "userMessageDeleteConversationRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userMessageDeleteConversationRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userMessageDeleteConversationRequest for root element {}userMessageDeleteConversationRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userMessageDeleteConversationRequest for root element {}userMessageDeleteConversationRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userMessageDeleteConversationRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserMessageDeleteConversationRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserMessageDeleteConversationRequest_M */
#ifndef DEF_MYSMSAPINS0UserDeviceUpdateRequest_M
#define DEF_MYSMSAPINS0UserDeviceUpdateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceUpdateRequest

/**
 * The device id
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The device id
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * Can the device receive calls.
 */
- (BOOL) canReceiveCall
{
  return _canReceiveCall;
}

/**
 * Can the device receive calls.
 */
- (void) setCanReceiveCall: (BOOL) newCanReceiveCall
{
  _canReceiveCall = newCanReceiveCall;
}

/**
 * Can the device initiate calls.
 */
- (BOOL) canInitiateCall
{
  return _canInitiateCall;
}

/**
 * Can the device initiate calls.
 */
- (void) setCanInitiateCall: (BOOL) newCanInitiateCall
{
  _canInitiateCall = newCanInitiateCall;
}

/**
 * The push registration id from the device operating system (i.e. android -> c2dm).
 */
- (NSString *) pushRegistrationId
{
  return _pushRegistrationId;
}

/**
 * The push registration id from the device operating system (i.e. android -> c2dm).
 */
- (void) setPushRegistrationId: (NSString *) newPushRegistrationId
{
  [newPushRegistrationId retain];
  [_pushRegistrationId release];
  _pushRegistrationId = newPushRegistrationId;
}

/**
 * Sets the push config which depends on the os and is usually in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (NSString *) pushConfig
{
  return _pushConfig;
}

/**
 * Sets the push config which depends on the os and is usually in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (void) setPushConfig: (NSString *) newPushConfig
{
  [newPushConfig retain];
  [_pushConfig release];
  _pushConfig = newPushConfig;
}

/**
 * Sets the max mms size in bytes that is allowed to send
 * 
 * This is an optional parameter
 */
- (int *) maxMmsSize
{
  return _maxMmsSize;
}

/**
 * Sets the max mms size in bytes that is allowed to send
 * 
 * This is an optional parameter
 */
- (void) setMaxMmsSize: (int *) newMaxMmsSize
{
  if (_maxMmsSize != NULL) {
    free(_maxMmsSize);
  }
  _maxMmsSize = newMaxMmsSize;
}

- (void) dealloc
{
  [self setPushRegistrationId: nil];
  [self setPushConfig: nil];
  [self setMaxMmsSize: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceUpdateRequest *_mYSMSAPINS0UserDeviceUpdateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceUpdateRequest = (MYSMSAPINS0UserDeviceUpdateRequest *) [MYSMSAPINS0UserDeviceUpdateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceUpdateRequest;
}

//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 MYSMSAPINS0UserDeviceUpdateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceUpdateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceUpdateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceUpdateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceUpdateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceUpdateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceUpdateRequest *_mYSMSAPINS0UserDeviceUpdateRequest = [[MYSMSAPINS0UserDeviceUpdateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceUpdateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceUpdateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceUpdateRequest autorelease];
  return _mYSMSAPINS0UserDeviceUpdateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceUpdateRequest 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 MYSMSAPINS0UserDeviceUpdateRequest 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 MYSMSAPINS0UserDeviceUpdateRequest from an XML reader. The element to be read is
 * "userDeviceUpdateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceUpdateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceUpdateRequest *_userDeviceUpdateRequest = 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 userDeviceUpdateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceUpdateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceUpdateRequest.");
#endif
    _userDeviceUpdateRequest = (MYSMSAPINS0UserDeviceUpdateRequest *)[MYSMSAPINS0UserDeviceUpdateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceUpdateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceUpdateRequest. Expected element userDeviceUpdateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceUpdateRequest. Expected element userDeviceUpdateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceUpdateRequest;
}

/**
 * Writes this MYSMSAPINS0UserDeviceUpdateRequest to XML under element name "userDeviceUpdateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceUpdateRequest The UserDeviceUpdateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceUpdateRequest 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 "userDeviceUpdateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceUpdateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceUpdateRequest for root element {}userDeviceUpdateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceUpdateRequest for root element {}userDeviceUpdateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceUpdateRequest. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canReceiveCall", 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 setCanReceiveCall: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canInitiateCall", 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 setCanInitiateCall: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushRegistrationId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushRegistrationId: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushConfig", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushConfig: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "maxMmsSize", 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 setMaxMmsSize: ((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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canReceiveCall", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canReceiveCall."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canReceiveCall...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_canReceiveCall);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canReceiveCall...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canReceiveCall."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canReceiveCall."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canInitiateCall", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canInitiateCall."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canInitiateCall...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_canInitiateCall);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canInitiateCall...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canInitiateCall."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canInitiateCall."];
    }
  }
  if ([self pushRegistrationId]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushRegistrationId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushRegistrationId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushRegistrationId...");
#endif
    [[self pushRegistrationId] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushRegistrationId...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushRegistrationId."];
    }
  }
  if ([self pushConfig]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushConfig", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushConfig."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushConfig...");
#endif
    [[self pushConfig] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushConfig...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushConfig."];
    }
  }
  if ([self maxMmsSize] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxMmsSize", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxMmsSize."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}maxMmsSize...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self maxMmsSize]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}maxMmsSize...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}maxMmsSize."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxMmsSize."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceUpdateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceUpdateRequest_M */
#ifndef DEF_MYSMSAPINS0UserDeviceCreateRequest_M
#define DEF_MYSMSAPINS0UserDeviceCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceCreateRequest

/**
 * The device operation system.
 * 
 * 0  .. android (c2dm)
 * 1  .. ios
 * 5  .. windows phone
 * 6  .. android (gcm)
 * 7  .. windows (metro)
 * 13 .. chrome (gcm)
 */
- (int) os
{
  return _os;
}

/**
 * The device operation system.
 * 
 * 0  .. android (c2dm)
 * 1  .. ios
 * 5  .. windows phone
 * 6  .. android (gcm)
 * 7  .. windows (metro)
 * 13 .. chrome (gcm)
 */
- (void) setOs: (int) newOs
{
  _os = newOs;
}

/**
 * Can the device send sms over sim.
 */
- (BOOL) canSendSms
{
  return _canSendSms;
}

/**
 * Can the device send sms over sim.
 */
- (void) setCanSendSms: (BOOL) newCanSendSms
{
  _canSendSms = newCanSendSms;
}

/**
 * Can the device receive calls.
 */
- (BOOL) canReceiveCall
{
  return _canReceiveCall;
}

/**
 * Can the device receive calls.
 */
- (void) setCanReceiveCall: (BOOL) newCanReceiveCall
{
  _canReceiveCall = newCanReceiveCall;
}

/**
 * Can the device initiate calls.
 */
- (BOOL) canInitiateCall
{
  return _canInitiateCall;
}

/**
 * Can the device initiate calls.
 */
- (void) setCanInitiateCall: (BOOL) newCanInitiateCall
{
  _canInitiateCall = newCanInitiateCall;
}

/**
 * The push registration id from the device operating system (i.e. android -> c2dm).
 */
- (NSString *) pushRegistrationId
{
  return _pushRegistrationId;
}

/**
 * The push registration id from the device operating system (i.e. android -> c2dm).
 */
- (void) setPushRegistrationId: (NSString *) newPushRegistrationId
{
  [newPushRegistrationId retain];
  [_pushRegistrationId release];
  _pushRegistrationId = newPushRegistrationId;
}

/**
 * If set and device limit is reached most inactive device will be removed before creation.
 */
- (BOOL) force
{
  return _force;
}

/**
 * If set and device limit is reached most inactive device will be removed before creation.
 */
- (void) setForce: (BOOL) newForce
{
  _force = newForce;
}

/**
 * Sets the amount of messages that are synchronized initially.
 */
- (int) messageHistoryLimit
{
  return _messageHistoryLimit;
}

/**
 * Sets the amount of messages that are synchronized initially.
 */
- (void) setMessageHistoryLimit: (int) newMessageHistoryLimit
{
  _messageHistoryLimit = newMessageHistoryLimit;
}

/**
 * Sets the push config which depends on the os and is usually a in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (NSString *) pushConfig
{
  return _pushConfig;
}

/**
 * Sets the push config which depends on the os and is usually a in json format.
 * 
 * iOS/iOS2:
 * {
 * sound : {
 * name : {
 * user : "", // name of sound file
 * group : "", // name of sound file
 * },
 * onlyOnFirstMessage : true/false
 * }
 * }
 * 
 * others: push config is ignored
 */
- (void) setPushConfig: (NSString *) newPushConfig
{
  [newPushConfig retain];
  [_pushConfig release];
  _pushConfig = newPushConfig;
}

/**
 * Sets the max mms size in bytes that is allowed to send
 * 
 * This is an optional parameter
 */
- (int *) maxMmsSize
{
  return _maxMmsSize;
}

/**
 * Sets the max mms size in bytes that is allowed to send
 * 
 * This is an optional parameter
 */
- (void) setMaxMmsSize: (int *) newMaxMmsSize
{
  if (_maxMmsSize != NULL) {
    free(_maxMmsSize);
  }
  _maxMmsSize = newMaxMmsSize;
}

- (void) dealloc
{
  [self setPushRegistrationId: nil];
  [self setPushConfig: nil];
  [self setMaxMmsSize: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceCreateRequest *_mYSMSAPINS0UserDeviceCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceCreateRequest = (MYSMSAPINS0UserDeviceCreateRequest *) [MYSMSAPINS0UserDeviceCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceCreateRequest;
}

//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 MYSMSAPINS0UserDeviceCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceCreateRequest *_mYSMSAPINS0UserDeviceCreateRequest = [[MYSMSAPINS0UserDeviceCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceCreateRequest autorelease];
  return _mYSMSAPINS0UserDeviceCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceCreateRequest 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 MYSMSAPINS0UserDeviceCreateRequest 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 MYSMSAPINS0UserDeviceCreateRequest from an XML reader. The element to be read is
 * "userDeviceCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceCreateRequest *_userDeviceCreateRequest = 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 userDeviceCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceCreateRequest.");
#endif
    _userDeviceCreateRequest = (MYSMSAPINS0UserDeviceCreateRequest *)[MYSMSAPINS0UserDeviceCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceCreateRequest. Expected element userDeviceCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceCreateRequest. Expected element userDeviceCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceCreateRequest;
}

/**
 * Writes this MYSMSAPINS0UserDeviceCreateRequest to XML under element name "userDeviceCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceCreateRequest The UserDeviceCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceCreateRequest 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 "userDeviceCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceCreateRequest for root element {}userDeviceCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceCreateRequest for root element {}userDeviceCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceCreateRequest. 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 "os", 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 setOs: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canSendSms", 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 setCanSendSms: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canReceiveCall", 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 setCanReceiveCall: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "canInitiateCall", 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 setCanInitiateCall: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushRegistrationId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushRegistrationId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushRegistrationId: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "force", 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 setForce: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "messageHistoryLimit", 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 setMessageHistoryLimit: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "pushConfig", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}pushConfig of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPushConfig: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "maxMmsSize", 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 setMaxMmsSize: ((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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "os", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}os."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}os...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_os);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}os...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}os."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}os."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canSendSms", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canSendSms."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canSendSms...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_canSendSms);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canSendSms...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canSendSms."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canSendSms."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canReceiveCall", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canReceiveCall."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canReceiveCall...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_canReceiveCall);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canReceiveCall...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canReceiveCall."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canReceiveCall."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canInitiateCall", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}canInitiateCall."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}canInitiateCall...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_canInitiateCall);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}canInitiateCall...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}canInitiateCall."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}canInitiateCall."];
    }
  }
  if ([self pushRegistrationId]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushRegistrationId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushRegistrationId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushRegistrationId...");
#endif
    [[self pushRegistrationId] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushRegistrationId...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushRegistrationId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "force", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}force."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}force...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_force);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}force...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}force."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}force."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageHistoryLimit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageHistoryLimit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageHistoryLimit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageHistoryLimit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageHistoryLimit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageHistoryLimit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageHistoryLimit."];
    }
  }
  if ([self pushConfig]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "pushConfig", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}pushConfig."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}pushConfig...");
#endif
    [[self pushConfig] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}pushConfig...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}pushConfig."];
    }
  }
  if ([self maxMmsSize] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxMmsSize", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxMmsSize."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}maxMmsSize...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self maxMmsSize]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}maxMmsSize...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}maxMmsSize."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxMmsSize."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceCreateRequest_M */
#ifndef DEF_MYSMSAPINS0UserDeviceClientDeleteRequest_M
#define DEF_MYSMSAPINS0UserDeviceClientDeleteRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserDeviceClientDeleteRequest

/**
 * The client device id to delete
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The client device id to delete
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserDeviceClientDeleteRequest *_mYSMSAPINS0UserDeviceClientDeleteRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserDeviceClientDeleteRequest = (MYSMSAPINS0UserDeviceClientDeleteRequest *) [MYSMSAPINS0UserDeviceClientDeleteRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserDeviceClientDeleteRequest;
}

//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 MYSMSAPINS0UserDeviceClientDeleteRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserDeviceClientDeleteRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserDeviceClientDeleteRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserDeviceClientDeleteRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserDeviceClientDeleteRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserDeviceClientDeleteRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserDeviceClientDeleteRequest *_mYSMSAPINS0UserDeviceClientDeleteRequest = [[MYSMSAPINS0UserDeviceClientDeleteRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserDeviceClientDeleteRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserDeviceClientDeleteRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserDeviceClientDeleteRequest autorelease];
  return _mYSMSAPINS0UserDeviceClientDeleteRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserDeviceClientDeleteRequest 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 MYSMSAPINS0UserDeviceClientDeleteRequest 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 MYSMSAPINS0UserDeviceClientDeleteRequest from an XML reader. The element to be read is
 * "userDeviceClientDeleteRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserDeviceClientDeleteRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserDeviceClientDeleteRequest *_userDeviceClientDeleteRequest = 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 userDeviceClientDeleteRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userDeviceClientDeleteRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userDeviceClientDeleteRequest.");
#endif
    _userDeviceClientDeleteRequest = (MYSMSAPINS0UserDeviceClientDeleteRequest *)[MYSMSAPINS0UserDeviceClientDeleteRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userDeviceClientDeleteRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientDeleteRequest. Expected element userDeviceClientDeleteRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserDeviceClientDeleteRequest. Expected element userDeviceClientDeleteRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userDeviceClientDeleteRequest;
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientDeleteRequest to XML under element name "userDeviceClientDeleteRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userDeviceClientDeleteRequest The UserDeviceClientDeleteRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserDeviceClientDeleteRequest 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 "userDeviceClientDeleteRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userDeviceClientDeleteRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userDeviceClientDeleteRequest for root element {}userDeviceClientDeleteRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userDeviceClientDeleteRequest for root element {}userDeviceClientDeleteRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userDeviceClientDeleteRequest. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserDeviceClientDeleteRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserDeviceClientDeleteRequest_M */
#ifndef DEF_MYSMSAPINS0UserContactOverrideUpdateRequest_M
#define DEF_MYSMSAPINS0UserContactOverrideUpdateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactOverrideUpdateRequest

/**
 * (no documentation provided)
 */
- (MYSMSAPINS0UserContactOverride *) contactOverride
{
  return _contactOverride;
}

/**
 * (no documentation provided)
 */
- (void) setContactOverride: (MYSMSAPINS0UserContactOverride *) newContactOverride
{
  [newContactOverride retain];
  [_contactOverride release];
  _contactOverride = newContactOverride;
}

- (void) dealloc
{
  [self setContactOverride: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactOverrideUpdateRequest *_mYSMSAPINS0UserContactOverrideUpdateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactOverrideUpdateRequest = (MYSMSAPINS0UserContactOverrideUpdateRequest *) [MYSMSAPINS0UserContactOverrideUpdateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactOverrideUpdateRequest;
}

//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 MYSMSAPINS0UserContactOverrideUpdateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactOverrideUpdateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactOverrideUpdateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactOverrideUpdateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactOverrideUpdateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactOverrideUpdateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactOverrideUpdateRequest *_mYSMSAPINS0UserContactOverrideUpdateRequest = [[MYSMSAPINS0UserContactOverrideUpdateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactOverrideUpdateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactOverrideUpdateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactOverrideUpdateRequest autorelease];
  return _mYSMSAPINS0UserContactOverrideUpdateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactOverrideUpdateRequest 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 MYSMSAPINS0UserContactOverrideUpdateRequest 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 MYSMSAPINS0UserContactOverrideUpdateRequest from an XML reader. The element to be read is
 * "userContactOverrideUpdateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactOverrideUpdateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactOverrideUpdateRequest *_userContactOverrideUpdateRequest = 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 userContactOverrideUpdateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactOverrideUpdateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactOverrideUpdateRequest.");
#endif
    _userContactOverrideUpdateRequest = (MYSMSAPINS0UserContactOverrideUpdateRequest *)[MYSMSAPINS0UserContactOverrideUpdateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactOverrideUpdateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactOverrideUpdateRequest. Expected element userContactOverrideUpdateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactOverrideUpdateRequest. Expected element userContactOverrideUpdateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactOverrideUpdateRequest;
}

/**
 * Writes this MYSMSAPINS0UserContactOverrideUpdateRequest to XML under element name "userContactOverrideUpdateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactOverrideUpdateRequest The UserContactOverrideUpdateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactOverrideUpdateRequest 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 "userContactOverrideUpdateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactOverrideUpdateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactOverrideUpdateRequest for root element {}userContactOverrideUpdateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactOverrideUpdateRequest for root element {}userContactOverrideUpdateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactOverrideUpdateRequest. 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 "contactOverride", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}contactOverride of type {}userContactOverride.");
#endif
    __child = [MYSMSAPINS0UserContactOverride readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}contactOverride of type {}userContactOverride.");
#endif

    [self setContactOverride: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self contactOverride]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "contactOverride", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}contactOverride."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}contactOverride...");
#endif
    [[self contactOverride] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}contactOverride...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}contactOverride."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserContactOverrideUpdateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactOverrideUpdateRequest_M */
#ifndef DEF_MYSMSAPINS0UserContactGetContactsRequest_M
#define DEF_MYSMSAPINS0UserContactGetContactsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserContactGetContactsRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserContactGetContactsRequest *_mYSMSAPINS0UserContactGetContactsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserContactGetContactsRequest = (MYSMSAPINS0UserContactGetContactsRequest *) [MYSMSAPINS0UserContactGetContactsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserContactGetContactsRequest;
}

//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 MYSMSAPINS0UserContactGetContactsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserContactGetContactsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserContactGetContactsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserContactGetContactsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserContactGetContactsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserContactGetContactsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserContactGetContactsRequest *_mYSMSAPINS0UserContactGetContactsRequest = [[MYSMSAPINS0UserContactGetContactsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserContactGetContactsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserContactGetContactsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserContactGetContactsRequest autorelease];
  return _mYSMSAPINS0UserContactGetContactsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserContactGetContactsRequest 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 MYSMSAPINS0UserContactGetContactsRequest 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 MYSMSAPINS0UserContactGetContactsRequest from an XML reader. The element to be read is
 * "userContactGetContactsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserContactGetContactsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserContactGetContactsRequest *_userContactGetContactsRequest = 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 userContactGetContactsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userContactGetContactsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userContactGetContactsRequest.");
#endif
    _userContactGetContactsRequest = (MYSMSAPINS0UserContactGetContactsRequest *)[MYSMSAPINS0UserContactGetContactsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userContactGetContactsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetContactsRequest. Expected element userContactGetContactsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserContactGetContactsRequest. Expected element userContactGetContactsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userContactGetContactsRequest;
}

/**
 * Writes this MYSMSAPINS0UserContactGetContactsRequest to XML under element name "userContactGetContactsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userContactGetContactsRequest The UserContactGetContactsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserContactGetContactsRequest 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 "userContactGetContactsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userContactGetContactsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userContactGetContactsRequest for root element {}userContactGetContactsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userContactGetContactsRequest for root element {}userContactGetContactsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userContactGetContactsRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserContactGetContactsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserContactGetContactsRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallUpdateRequest_M
#define DEF_MYSMSAPINS0UserCallUpdateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallUpdateRequest

/**
 * The call id of the call which should be updated.
 */
- (int) callId
{
  return _callId;
}

/**
 * The call id of the call which should be updated.
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

/**
 * True if the call was already read otherwise the call is marked unread. (optional)
 */
- (BOOL *) read
{
  return _read;
}

/**
 * True if the call was already read otherwise the call is marked unread. (optional)
 */
- (void) setRead: (BOOL *) newRead
{
  if (_read != NULL) {
    free(_read);
  }
  _read = newRead;
}

/**
 * The duration of the call in seconds (optional)
 */
- (int *) duration
{
  return _duration;
}

/**
 * The duration of the call in seconds (optional)
 */
- (void) setDuration: (int *) newDuration
{
  if (_duration != NULL) {
    free(_duration);
  }
  _duration = newDuration;
}

/**
 * The status of the call (optional)
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (int *) status
{
  return _status;
}

/**
 * The status of the call (optional)
 * 
 * 0 .. ringing
 * 1 .. active
 * 2 .. complete
 * 3 .. missed
 */
- (void) setStatus: (int *) newStatus
{
  if (_status != NULL) {
    free(_status);
  }
  _status = newStatus;
}

- (void) dealloc
{
  [self setRead: NULL];
  [self setDuration: NULL];
  [self setStatus: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallUpdateRequest *_mYSMSAPINS0UserCallUpdateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallUpdateRequest = (MYSMSAPINS0UserCallUpdateRequest *) [MYSMSAPINS0UserCallUpdateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallUpdateRequest;
}

//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 MYSMSAPINS0UserCallUpdateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallUpdateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallUpdateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallUpdateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallUpdateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallUpdateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallUpdateRequest *_mYSMSAPINS0UserCallUpdateRequest = [[MYSMSAPINS0UserCallUpdateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallUpdateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallUpdateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallUpdateRequest autorelease];
  return _mYSMSAPINS0UserCallUpdateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallUpdateRequest 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 MYSMSAPINS0UserCallUpdateRequest 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 MYSMSAPINS0UserCallUpdateRequest from an XML reader. The element to be read is
 * "userCallUpdateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallUpdateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallUpdateRequest *_userCallUpdateRequest = 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 userCallUpdateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallUpdateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallUpdateRequest.");
#endif
    _userCallUpdateRequest = (MYSMSAPINS0UserCallUpdateRequest *)[MYSMSAPINS0UserCallUpdateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallUpdateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallUpdateRequest. Expected element userCallUpdateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallUpdateRequest. Expected element userCallUpdateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallUpdateRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallUpdateRequest to XML under element name "userCallUpdateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallUpdateRequest The UserCallUpdateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallUpdateRequest 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 "userCallUpdateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallUpdateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallUpdateRequest for root element {}userCallUpdateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallUpdateRequest for root element {}userCallUpdateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallUpdateRequest. 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 "callId", 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 setCallId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "read", 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 setRead: ((BOOL*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "duration", 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 setDuration: ((int*) _child_accessor)];
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "status", 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 setStatus: ((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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}callId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_callId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}callId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}callId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}callId."];
    }
  }
  if ([self read] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "read", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}read."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}read...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self read]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}read...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}read."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}read."];
    }
  }
  if ([self duration] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "duration", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}duration."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}duration...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self duration]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}duration...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}duration."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}duration."];
    }
  }
  if ([self status] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "status", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}status."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}status...");
#endif
    status = xmlTextWriterWriteIntType(writer, [self status]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}status...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}status."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}status."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallUpdateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallUpdateRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallSyncRequest_M
#define DEF_MYSMSAPINS0UserCallSyncRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallSyncRequest

/**
 * The registered device id for the device.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

/**
 * The calls that was modified on the device and needs to be synced to the server.
 */
- (NSArray *) syncs
{
  return _syncs;
}

/**
 * The calls that was modified on the device and needs to be synced to the server.
 */
- (void) setSyncs: (NSArray *) newSyncs
{
  [newSyncs retain];
  [_syncs release];
  _syncs = newSyncs;
}

/**
 * The acknowledge of calls synchronized previously from the server.
 */
- (NSArray *) syncAcks
{
  return _syncAcks;
}

/**
 * The acknowledge of calls synchronized previously from the server.
 */
- (void) setSyncAcks: (NSArray *) newSyncAcks
{
  [newSyncAcks retain];
  [_syncAcks release];
  _syncAcks = newSyncAcks;
}

/**
 * The maximum amount of calls that will be returned from server
 */
- (int) syncLimit
{
  return _syncLimit;
}

/**
 * The maximum amount of calls that will be returned from server
 */
- (void) setSyncLimit: (int) newSyncLimit
{
  _syncLimit = newSyncLimit;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (BOOL *) syncInitial
{
  return _syncInitial;
}

/**
 * True if the sync is the first sync. If not set the value will not change.
 */
- (void) setSyncInitial: (BOOL *) newSyncInitial
{
  if (_syncInitial != NULL) {
    free(_syncInitial);
  }
  _syncInitial = newSyncInitial;
}

- (void) dealloc
{
  [self setSyncs: nil];
  [self setSyncAcks: nil];
  [self setSyncInitial: NULL];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallSyncRequest *_mYSMSAPINS0UserCallSyncRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallSyncRequest = (MYSMSAPINS0UserCallSyncRequest *) [MYSMSAPINS0UserCallSyncRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallSyncRequest;
}

//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 MYSMSAPINS0UserCallSyncRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallSyncRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallSyncRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallSyncRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallSyncRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallSyncRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallSyncRequest *_mYSMSAPINS0UserCallSyncRequest = [[MYSMSAPINS0UserCallSyncRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallSyncRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallSyncRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallSyncRequest autorelease];
  return _mYSMSAPINS0UserCallSyncRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallSyncRequest 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 MYSMSAPINS0UserCallSyncRequest 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 MYSMSAPINS0UserCallSyncRequest from an XML reader. The element to be read is
 * "userCallSyncRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallSyncRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallSyncRequest *_userCallSyncRequest = 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 userCallSyncRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallSyncRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallSyncRequest.");
#endif
    _userCallSyncRequest = (MYSMSAPINS0UserCallSyncRequest *)[MYSMSAPINS0UserCallSyncRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallSyncRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallSyncRequest. Expected element userCallSyncRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallSyncRequest. Expected element userCallSyncRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallSyncRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallSyncRequest to XML under element name "userCallSyncRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallSyncRequest The UserCallSyncRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallSyncRequest 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 "userCallSyncRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallSyncRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallSyncRequest for root element {}userCallSyncRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallSyncRequest for root element {}userCallSyncRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallSyncRequest. 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 "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncs", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncs of type {}userCallSync.");
#endif

     __child = [MYSMSAPINS0UserCallSync readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncs of type {}userCallSync.");
#endif

    if ([self syncs]) {
      [self setSyncs: [[self syncs] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncs: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncAcks", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}syncAcks of type {}userCallSyncAck.");
#endif

     __child = [MYSMSAPINS0UserCallSyncAck readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}syncAcks of type {}userCallSyncAck.");
#endif

    if ([self syncAcks]) {
      [self setSyncAcks: [[self syncAcks] arrayByAddingObject: __child]];
    }
    else {
      [self setSyncAcks: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncLimit", 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 setSyncLimit: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "syncInitial", 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 setSyncInitial: ((BOOL*) _child_accessor)];
    return YES;
  }

  return NO;
}

//documentation inherited.
- (int) readUnknownJAXBChildElement: (xmlTextReaderPtr) reader
{
  return [super readUnknownJAXBChildElement: reader];
}

//documentation inherited.
- (void) readUnknownJAXBAttribute: (xmlTextReaderPtr) reader
{
  [super readUnknownJAXBAttribute: reader];
}

//documentation inherited.
- (void) writeJAXBAttributes: (xmlTextWriterPtr) writer
{
  int status;

  [super writeJAXBAttributes: writer];

}

//documentation inherited.
- (void) writeJAXBValue: (xmlTextWriterPtr) writer
{
  [super writeJAXBValue: writer];
}

/**
 * Method for writing the child elements.
 *
 * @param writer The writer.
 */
- (void) writeJAXBChildElements: (xmlTextWriterPtr) writer
{
  int status;
  id __item;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
  if ([self syncs]) {
    __enumerator = [[self syncs] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncs", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncs."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncs...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncs...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncs."];
      }
    } //end item iterator.
  }
  if ([self syncAcks]) {
    __enumerator = [[self syncAcks] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncAcks", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}syncAcks."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}syncAcks...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}syncAcks...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}syncAcks."];
      }
    } //end item iterator.
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncLimit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncLimit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncLimit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_syncLimit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncLimit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncLimit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncLimit."];
    }
  }
  if ([self syncInitial] != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "syncInitial", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}syncInitial."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}syncInitial...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, [self syncInitial]);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}syncInitial...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}syncInitial."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}syncInitial."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallSyncRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallSyncRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallReadAllRequest_M
#define DEF_MYSMSAPINS0UserCallReadAllRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallReadAllRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallReadAllRequest *_mYSMSAPINS0UserCallReadAllRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallReadAllRequest = (MYSMSAPINS0UserCallReadAllRequest *) [MYSMSAPINS0UserCallReadAllRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallReadAllRequest;
}

//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 MYSMSAPINS0UserCallReadAllRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallReadAllRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallReadAllRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallReadAllRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallReadAllRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallReadAllRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallReadAllRequest *_mYSMSAPINS0UserCallReadAllRequest = [[MYSMSAPINS0UserCallReadAllRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallReadAllRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallReadAllRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallReadAllRequest autorelease];
  return _mYSMSAPINS0UserCallReadAllRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallReadAllRequest 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 MYSMSAPINS0UserCallReadAllRequest 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 MYSMSAPINS0UserCallReadAllRequest from an XML reader. The element to be read is
 * "userCallReadAllRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallReadAllRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallReadAllRequest *_userCallReadAllRequest = 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 userCallReadAllRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallReadAllRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallReadAllRequest.");
#endif
    _userCallReadAllRequest = (MYSMSAPINS0UserCallReadAllRequest *)[MYSMSAPINS0UserCallReadAllRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallReadAllRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallReadAllRequest. Expected element userCallReadAllRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallReadAllRequest. Expected element userCallReadAllRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallReadAllRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallReadAllRequest to XML under element name "userCallReadAllRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallReadAllRequest The UserCallReadAllRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallReadAllRequest 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 "userCallReadAllRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallReadAllRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallReadAllRequest for root element {}userCallReadAllRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallReadAllRequest for root element {}userCallReadAllRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallReadAllRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallReadAllRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallReadAllRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallGetCallsRequest_M
#define DEF_MYSMSAPINS0UserCallGetCallsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallGetCallsRequest

/**
 * The offset of the user call list.
 */
- (int) offset
{
  return _offset;
}

/**
 * The offset of the user call list.
 */
- (void) setOffset: (int) newOffset
{
  _offset = newOffset;
}

/**
 * The limit of the user call list.
 */
- (int) limit
{
  return _limit;
}

/**
 * The limit of the user call list.
 */
- (void) setLimit: (int) newLimit
{
  _limit = newLimit;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallGetCallsRequest *_mYSMSAPINS0UserCallGetCallsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallGetCallsRequest = (MYSMSAPINS0UserCallGetCallsRequest *) [MYSMSAPINS0UserCallGetCallsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallGetCallsRequest;
}

//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 MYSMSAPINS0UserCallGetCallsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallGetCallsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallGetCallsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallGetCallsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallGetCallsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallGetCallsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallGetCallsRequest *_mYSMSAPINS0UserCallGetCallsRequest = [[MYSMSAPINS0UserCallGetCallsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallGetCallsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallGetCallsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallGetCallsRequest autorelease];
  return _mYSMSAPINS0UserCallGetCallsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallGetCallsRequest 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 MYSMSAPINS0UserCallGetCallsRequest 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 MYSMSAPINS0UserCallGetCallsRequest from an XML reader. The element to be read is
 * "userCallGetCallsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallGetCallsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallGetCallsRequest *_userCallGetCallsRequest = 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 userCallGetCallsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallGetCallsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallGetCallsRequest.");
#endif
    _userCallGetCallsRequest = (MYSMSAPINS0UserCallGetCallsRequest *)[MYSMSAPINS0UserCallGetCallsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallGetCallsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallGetCallsRequest. Expected element userCallGetCallsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallGetCallsRequest. Expected element userCallGetCallsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallGetCallsRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallGetCallsRequest to XML under element name "userCallGetCallsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallGetCallsRequest The UserCallGetCallsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallGetCallsRequest 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 "userCallGetCallsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallGetCallsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallGetCallsRequest for root element {}userCallGetCallsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallGetCallsRequest for root element {}userCallGetCallsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallGetCallsRequest. 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 "offset", 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 setOffset: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "limit", 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 setLimit: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "offset", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}offset."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}offset...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_offset);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}offset...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}offset."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}offset."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "limit", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}limit."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}limit...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_limit);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}limit...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}limit."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}limit."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserCallGetCallsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallGetCallsRequest_M */
#ifndef DEF_MYSMSAPINS0UserCallDeleteAllRequest_M
#define DEF_MYSMSAPINS0UserCallDeleteAllRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserCallDeleteAllRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserCallDeleteAllRequest *_mYSMSAPINS0UserCallDeleteAllRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserCallDeleteAllRequest = (MYSMSAPINS0UserCallDeleteAllRequest *) [MYSMSAPINS0UserCallDeleteAllRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserCallDeleteAllRequest;
}

//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 MYSMSAPINS0UserCallDeleteAllRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserCallDeleteAllRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserCallDeleteAllRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserCallDeleteAllRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserCallDeleteAllRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserCallDeleteAllRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserCallDeleteAllRequest *_mYSMSAPINS0UserCallDeleteAllRequest = [[MYSMSAPINS0UserCallDeleteAllRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserCallDeleteAllRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserCallDeleteAllRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserCallDeleteAllRequest autorelease];
  return _mYSMSAPINS0UserCallDeleteAllRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserCallDeleteAllRequest 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 MYSMSAPINS0UserCallDeleteAllRequest 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 MYSMSAPINS0UserCallDeleteAllRequest from an XML reader. The element to be read is
 * "userCallDeleteAllRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserCallDeleteAllRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserCallDeleteAllRequest *_userCallDeleteAllRequest = 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 userCallDeleteAllRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userCallDeleteAllRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userCallDeleteAllRequest.");
#endif
    _userCallDeleteAllRequest = (MYSMSAPINS0UserCallDeleteAllRequest *)[MYSMSAPINS0UserCallDeleteAllRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userCallDeleteAllRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteAllRequest. Expected element userCallDeleteAllRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserCallDeleteAllRequest. Expected element userCallDeleteAllRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userCallDeleteAllRequest;
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteAllRequest to XML under element name "userCallDeleteAllRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userCallDeleteAllRequest The UserCallDeleteAllRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserCallDeleteAllRequest 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 "userCallDeleteAllRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userCallDeleteAllRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userCallDeleteAllRequest for root element {}userCallDeleteAllRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userCallDeleteAllRequest for root element {}userCallDeleteAllRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userCallDeleteAllRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserCallDeleteAllRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserCallDeleteAllRequest_M */
#ifndef DEF_MYSMSAPINS0UserVerifyMsisdnRequest_M
#define DEF_MYSMSAPINS0UserVerifyMsisdnRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserVerifyMsisdnRequest

/**
 * The user's verified mobile number
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The user's verified mobile number
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (int) msisdnVerifyPin
{
  return _msisdnVerifyPin;
}

/**
 * The msisdn verify pin send to the user (see msisdn/verify)
 */
- (void) setMsisdnVerifyPin: (int) newMsisdnVerifyPin
{
  _msisdnVerifyPin = newMsisdnVerifyPin;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserVerifyMsisdnRequest *_mYSMSAPINS0UserVerifyMsisdnRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserVerifyMsisdnRequest = (MYSMSAPINS0UserVerifyMsisdnRequest *) [MYSMSAPINS0UserVerifyMsisdnRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserVerifyMsisdnRequest;
}

//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 MYSMSAPINS0UserVerifyMsisdnRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserVerifyMsisdnRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserVerifyMsisdnRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserVerifyMsisdnRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserVerifyMsisdnRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserVerifyMsisdnRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserVerifyMsisdnRequest *_mYSMSAPINS0UserVerifyMsisdnRequest = [[MYSMSAPINS0UserVerifyMsisdnRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserVerifyMsisdnRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserVerifyMsisdnRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserVerifyMsisdnRequest autorelease];
  return _mYSMSAPINS0UserVerifyMsisdnRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserVerifyMsisdnRequest 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 MYSMSAPINS0UserVerifyMsisdnRequest 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 MYSMSAPINS0UserVerifyMsisdnRequest from an XML reader. The element to be read is
 * "userVerifyMsisdnRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserVerifyMsisdnRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserVerifyMsisdnRequest *_userVerifyMsisdnRequest = 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 userVerifyMsisdnRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userVerifyMsisdnRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userVerifyMsisdnRequest.");
#endif
    _userVerifyMsisdnRequest = (MYSMSAPINS0UserVerifyMsisdnRequest *)[MYSMSAPINS0UserVerifyMsisdnRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userVerifyMsisdnRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserVerifyMsisdnRequest. Expected element userVerifyMsisdnRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserVerifyMsisdnRequest. Expected element userVerifyMsisdnRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userVerifyMsisdnRequest;
}

/**
 * Writes this MYSMSAPINS0UserVerifyMsisdnRequest to XML under element name "userVerifyMsisdnRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userVerifyMsisdnRequest The UserVerifyMsisdnRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserVerifyMsisdnRequest 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 "userVerifyMsisdnRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userVerifyMsisdnRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userVerifyMsisdnRequest for root element {}userVerifyMsisdnRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userVerifyMsisdnRequest for root element {}userVerifyMsisdnRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userVerifyMsisdnRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdnVerifyPin", 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 setMsisdnVerifyPin: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdnVerifyPin", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdnVerifyPin."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdnVerifyPin...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_msisdnVerifyPin);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdnVerifyPin...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdnVerifyPin."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdnVerifyPin."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserVerifyMsisdnRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserVerifyMsisdnRequest_M */
#ifndef DEF_MYSMSAPINS0UserSetSettingRequest_M
#define DEF_MYSMSAPINS0UserSetSettingRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserSetSettingRequest

/**
 * The sms routing.
 * 
 * 0: send all sms over sim
 * 1: send all sms over mysms
 * 2: send national sms over sim and international over mysms
 */
- (int) smsRouting
{
  return _smsRouting;
}

/**
 * The sms routing.
 * 
 * 0: send all sms over sim
 * 1: send all sms over mysms
 * 2: send national sms over sim and international over mysms
 */
- (void) setSmsRouting: (int) newSmsRouting
{
  _smsRouting = newSmsRouting;
}

/**
 * The user's signature
 */
- (NSString *) signature
{
  return _signature;
}

/**
 * The user's signature
 */
- (void) setSignature: (NSString *) newSignature
{
  [newSignature retain];
  [_signature release];
  _signature = newSignature;
}

/**
 * The account to account send enabled state
 */
- (BOOL) a2aSendEnabled
{
  return _a2aSendEnabled;
}

/**
 * The account to account send enabled state
 */
- (void) setA2aSendEnabled: (BOOL) newA2aSendEnabled
{
  _a2aSendEnabled = newA2aSendEnabled;
}

/**
 * The account to account receive enabled state
 */
- (BOOL) a2aReceiveEnabled
{
  return _a2aReceiveEnabled;
}

/**
 * The account to account receive enabled state
 */
- (void) setA2aReceiveEnabled: (BOOL) newA2aReceiveEnabled
{
  _a2aReceiveEnabled = newA2aReceiveEnabled;
}

- (void) dealloc
{
  [self setSignature: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserSetSettingRequest *_mYSMSAPINS0UserSetSettingRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserSetSettingRequest = (MYSMSAPINS0UserSetSettingRequest *) [MYSMSAPINS0UserSetSettingRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserSetSettingRequest;
}

//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 MYSMSAPINS0UserSetSettingRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserSetSettingRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserSetSettingRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserSetSettingRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserSetSettingRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserSetSettingRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserSetSettingRequest *_mYSMSAPINS0UserSetSettingRequest = [[MYSMSAPINS0UserSetSettingRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserSetSettingRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserSetSettingRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserSetSettingRequest autorelease];
  return _mYSMSAPINS0UserSetSettingRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserSetSettingRequest 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 MYSMSAPINS0UserSetSettingRequest 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 MYSMSAPINS0UserSetSettingRequest from an XML reader. The element to be read is
 * "userSetSettingRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserSetSettingRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserSetSettingRequest *_userSetSettingRequest = 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 userSetSettingRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userSetSettingRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userSetSettingRequest.");
#endif
    _userSetSettingRequest = (MYSMSAPINS0UserSetSettingRequest *)[MYSMSAPINS0UserSetSettingRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userSetSettingRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSettingRequest. Expected element userSetSettingRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserSetSettingRequest. Expected element userSetSettingRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userSetSettingRequest;
}

/**
 * Writes this MYSMSAPINS0UserSetSettingRequest to XML under element name "userSetSettingRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userSetSettingRequest The UserSetSettingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserSetSettingRequest 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 "userSetSettingRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userSetSettingRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userSetSettingRequest for root element {}userSetSettingRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userSetSettingRequest for root element {}userSetSettingRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userSetSettingRequest. 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 "smsRouting", 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 setSmsRouting: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "signature", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}signature of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}signature of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSignature: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "a2aSendEnabled", 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 setA2aSendEnabled: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "a2aReceiveEnabled", 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 setA2aReceiveEnabled: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsRouting", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsRouting."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsRouting...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsRouting);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsRouting...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsRouting."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsRouting."];
    }
  }
  if ([self signature]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "signature", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}signature."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}signature...");
#endif
    [[self signature] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}signature...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}signature."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "a2aSendEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}a2aSendEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}a2aSendEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_a2aSendEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}a2aSendEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}a2aSendEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}a2aSendEnabled."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "a2aReceiveEnabled", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}a2aReceiveEnabled."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}a2aReceiveEnabled...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_a2aReceiveEnabled);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}a2aReceiveEnabled...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}a2aReceiveEnabled."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}a2aReceiveEnabled."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserSetSettingRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserSetSettingRequest_M */
#ifndef DEF_MYSMSAPINS0UserGetSmsRoutingRequest_M
#define DEF_MYSMSAPINS0UserGetSmsRoutingRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetSmsRoutingRequest

/**
 * The mobile number of the recipient
 */
- (long long) msisdn
{
  return _msisdn;
}

/**
 * The mobile number of the recipient
 */
- (void) setMsisdn: (long long) newMsisdn
{
  _msisdn = newMsisdn;
}

/**
 * Prefer the saved entry over a2a routing
 */
- (BOOL) preferSaved
{
  return _preferSaved;
}

/**
 * Prefer the saved entry over a2a routing
 */
- (void) setPreferSaved: (BOOL) newPreferSaved
{
  _preferSaved = newPreferSaved;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetSmsRoutingRequest *_mYSMSAPINS0UserGetSmsRoutingRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetSmsRoutingRequest = (MYSMSAPINS0UserGetSmsRoutingRequest *) [MYSMSAPINS0UserGetSmsRoutingRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetSmsRoutingRequest;
}

//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 MYSMSAPINS0UserGetSmsRoutingRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetSmsRoutingRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetSmsRoutingRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetSmsRoutingRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetSmsRoutingRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetSmsRoutingRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetSmsRoutingRequest *_mYSMSAPINS0UserGetSmsRoutingRequest = [[MYSMSAPINS0UserGetSmsRoutingRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetSmsRoutingRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetSmsRoutingRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetSmsRoutingRequest autorelease];
  return _mYSMSAPINS0UserGetSmsRoutingRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetSmsRoutingRequest 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 MYSMSAPINS0UserGetSmsRoutingRequest 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 MYSMSAPINS0UserGetSmsRoutingRequest from an XML reader. The element to be read is
 * "userGetSmsRoutingRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetSmsRoutingRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetSmsRoutingRequest *_userGetSmsRoutingRequest = 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 userGetSmsRoutingRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetSmsRoutingRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetSmsRoutingRequest.");
#endif
    _userGetSmsRoutingRequest = (MYSMSAPINS0UserGetSmsRoutingRequest *)[MYSMSAPINS0UserGetSmsRoutingRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetSmsRoutingRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSmsRoutingRequest. Expected element userGetSmsRoutingRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSmsRoutingRequest. Expected element userGetSmsRoutingRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetSmsRoutingRequest;
}

/**
 * Writes this MYSMSAPINS0UserGetSmsRoutingRequest to XML under element name "userGetSmsRoutingRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetSmsRoutingRequest The UserGetSmsRoutingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetSmsRoutingRequest 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 "userGetSmsRoutingRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetSmsRoutingRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetSmsRoutingRequest for root element {}userGetSmsRoutingRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetSmsRoutingRequest for root element {}userGetSmsRoutingRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetSmsRoutingRequest. 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 "msisdn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setMsisdn: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "preferSaved", 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 setPreferSaved: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}msisdn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}msisdn...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_msisdn);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}msisdn...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}msisdn."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}msisdn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "preferSaved", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}preferSaved."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}preferSaved...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_preferSaved);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}preferSaved...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}preferSaved."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}preferSaved."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserGetSmsRoutingRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetSmsRoutingRequest_M */
#ifndef DEF_MYSMSAPINS0UserGetSettingRequest_M
#define DEF_MYSMSAPINS0UserGetSettingRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetSettingRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetSettingRequest *_mYSMSAPINS0UserGetSettingRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetSettingRequest = (MYSMSAPINS0UserGetSettingRequest *) [MYSMSAPINS0UserGetSettingRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetSettingRequest;
}

//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 MYSMSAPINS0UserGetSettingRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetSettingRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetSettingRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetSettingRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetSettingRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetSettingRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetSettingRequest *_mYSMSAPINS0UserGetSettingRequest = [[MYSMSAPINS0UserGetSettingRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetSettingRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetSettingRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetSettingRequest autorelease];
  return _mYSMSAPINS0UserGetSettingRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetSettingRequest 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 MYSMSAPINS0UserGetSettingRequest 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 MYSMSAPINS0UserGetSettingRequest from an XML reader. The element to be read is
 * "userGetSettingRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetSettingRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetSettingRequest *_userGetSettingRequest = 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 userGetSettingRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetSettingRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetSettingRequest.");
#endif
    _userGetSettingRequest = (MYSMSAPINS0UserGetSettingRequest *)[MYSMSAPINS0UserGetSettingRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetSettingRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSettingRequest. Expected element userGetSettingRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetSettingRequest. Expected element userGetSettingRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetSettingRequest;
}

/**
 * Writes this MYSMSAPINS0UserGetSettingRequest to XML under element name "userGetSettingRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetSettingRequest The UserGetSettingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetSettingRequest 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 "userGetSettingRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetSettingRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetSettingRequest for root element {}userGetSettingRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetSettingRequest for root element {}userGetSettingRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetSettingRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserGetSettingRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetSettingRequest_M */
#ifndef DEF_MYSMSAPINS0UserGetBalanceRequest_M
#define DEF_MYSMSAPINS0UserGetBalanceRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserGetBalanceRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserGetBalanceRequest *_mYSMSAPINS0UserGetBalanceRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserGetBalanceRequest = (MYSMSAPINS0UserGetBalanceRequest *) [MYSMSAPINS0UserGetBalanceRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserGetBalanceRequest;
}

//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 MYSMSAPINS0UserGetBalanceRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserGetBalanceRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserGetBalanceRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserGetBalanceRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserGetBalanceRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserGetBalanceRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserGetBalanceRequest *_mYSMSAPINS0UserGetBalanceRequest = [[MYSMSAPINS0UserGetBalanceRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserGetBalanceRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserGetBalanceRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserGetBalanceRequest autorelease];
  return _mYSMSAPINS0UserGetBalanceRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserGetBalanceRequest 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 MYSMSAPINS0UserGetBalanceRequest 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 MYSMSAPINS0UserGetBalanceRequest from an XML reader. The element to be read is
 * "userGetBalanceRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserGetBalanceRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserGetBalanceRequest *_userGetBalanceRequest = 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 userGetBalanceRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userGetBalanceRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userGetBalanceRequest.");
#endif
    _userGetBalanceRequest = (MYSMSAPINS0UserGetBalanceRequest *)[MYSMSAPINS0UserGetBalanceRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userGetBalanceRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetBalanceRequest. Expected element userGetBalanceRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserGetBalanceRequest. Expected element userGetBalanceRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userGetBalanceRequest;
}

/**
 * Writes this MYSMSAPINS0UserGetBalanceRequest to XML under element name "userGetBalanceRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userGetBalanceRequest The UserGetBalanceRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserGetBalanceRequest 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 "userGetBalanceRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userGetBalanceRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userGetBalanceRequest for root element {}userGetBalanceRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userGetBalanceRequest for root element {}userGetBalanceRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userGetBalanceRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0UserGetBalanceRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserGetBalanceRequest_M */
#ifndef DEF_MYSMSAPINS0UserChangePasswordRequest_M
#define DEF_MYSMSAPINS0UserChangePasswordRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0UserChangePasswordRequest

/**
 * The new password
 */
- (NSString *) password
{
  return _password;
}

/**
 * The new password
 */
- (void) setPassword: (NSString *) newPassword
{
  [newPassword retain];
  [_password release];
  _password = newPassword;
}

- (void) dealloc
{
  [self setPassword: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0UserChangePasswordRequest *_mYSMSAPINS0UserChangePasswordRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0UserChangePasswordRequest = (MYSMSAPINS0UserChangePasswordRequest *) [MYSMSAPINS0UserChangePasswordRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0UserChangePasswordRequest;
}

//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 MYSMSAPINS0UserChangePasswordRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0UserChangePasswordRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0UserChangePasswordRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0UserChangePasswordRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0UserChangePasswordRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0UserChangePasswordRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0UserChangePasswordRequest *_mYSMSAPINS0UserChangePasswordRequest = [[MYSMSAPINS0UserChangePasswordRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0UserChangePasswordRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0UserChangePasswordRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0UserChangePasswordRequest autorelease];
  return _mYSMSAPINS0UserChangePasswordRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0UserChangePasswordRequest 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 MYSMSAPINS0UserChangePasswordRequest 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 MYSMSAPINS0UserChangePasswordRequest from an XML reader. The element to be read is
 * "userChangePasswordRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0UserChangePasswordRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0UserChangePasswordRequest *_userChangePasswordRequest = 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 userChangePasswordRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "userChangePasswordRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}userChangePasswordRequest.");
#endif
    _userChangePasswordRequest = (MYSMSAPINS0UserChangePasswordRequest *)[MYSMSAPINS0UserChangePasswordRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}userChangePasswordRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserChangePasswordRequest. Expected element userChangePasswordRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0UserChangePasswordRequest. Expected element userChangePasswordRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _userChangePasswordRequest;
}

/**
 * Writes this MYSMSAPINS0UserChangePasswordRequest to XML under element name "userChangePasswordRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _userChangePasswordRequest The UserChangePasswordRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0UserChangePasswordRequest 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 "userChangePasswordRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}userChangePasswordRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}userChangePasswordRequest for root element {}userChangePasswordRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}userChangePasswordRequest for root element {}userChangePasswordRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}userChangePasswordRequest. 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 "password", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}password of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPassword: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self password]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "password", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}password."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}password...");
#endif
    [[self password] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}password...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}password."];
    }
  }
}
@end /* implementation MYSMSAPINS0UserChangePasswordRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0UserChangePasswordRequest_M */
#ifndef DEF_MYSMSAPINS0TypingFireEventRequest_M
#define DEF_MYSMSAPINS0TypingFireEventRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0TypingFireEventRequest

/**
 * The recipient in international format (+436761234567)
 */
- (NSString *) recipient
{
  return _recipient;
}

/**
 * The recipient in international format (+436761234567)
 */
- (void) setRecipient: (NSString *) newRecipient
{
  [newRecipient retain];
  [_recipient release];
  _recipient = newRecipient;
}

- (void) dealloc
{
  [self setRecipient: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0TypingFireEventRequest *_mYSMSAPINS0TypingFireEventRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0TypingFireEventRequest = (MYSMSAPINS0TypingFireEventRequest *) [MYSMSAPINS0TypingFireEventRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0TypingFireEventRequest;
}

//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 MYSMSAPINS0TypingFireEventRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0TypingFireEventRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0TypingFireEventRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0TypingFireEventRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0TypingFireEventRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0TypingFireEventRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0TypingFireEventRequest *_mYSMSAPINS0TypingFireEventRequest = [[MYSMSAPINS0TypingFireEventRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0TypingFireEventRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0TypingFireEventRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0TypingFireEventRequest autorelease];
  return _mYSMSAPINS0TypingFireEventRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0TypingFireEventRequest 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 MYSMSAPINS0TypingFireEventRequest 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 MYSMSAPINS0TypingFireEventRequest from an XML reader. The element to be read is
 * "typingFireEventRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0TypingFireEventRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0TypingFireEventRequest *_typingFireEventRequest = 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 typingFireEventRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "typingFireEventRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}typingFireEventRequest.");
#endif
    _typingFireEventRequest = (MYSMSAPINS0TypingFireEventRequest *)[MYSMSAPINS0TypingFireEventRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}typingFireEventRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0TypingFireEventRequest. Expected element typingFireEventRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0TypingFireEventRequest. Expected element typingFireEventRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _typingFireEventRequest;
}

/**
 * Writes this MYSMSAPINS0TypingFireEventRequest to XML under element name "typingFireEventRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _typingFireEventRequest The TypingFireEventRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0TypingFireEventRequest 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 "typingFireEventRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}typingFireEventRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}typingFireEventRequest for root element {}typingFireEventRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}typingFireEventRequest for root element {}typingFireEventRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}typingFireEventRequest. 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 "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}recipient of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}recipient of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRecipient: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self recipient]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipient."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}recipient...");
#endif
    [[self recipient] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}recipient...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
}
@end /* implementation MYSMSAPINS0TypingFireEventRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0TypingFireEventRequest_M */
#ifndef DEF_MYSMSAPINS0SmsConnectorCreateRequest_M
#define DEF_MYSMSAPINS0SmsConnectorCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsConnectorCreateRequest

/**
 * The operation system for which this connector is for.
 * 
 * 0 .. android
 */
- (int) os
{
  return _os;
}

/**
 * The operation system for which this connector is for.
 * 
 * 0 .. android
 */
- (void) setOs: (int) newOs
{
  _os = newOs;
}

/**
 * The package name of the sms connector
 */
- (NSString *) packageName
{
  return _packageName;
}

/**
 * The package name of the sms connector
 */
- (void) setPackageName: (NSString *) newPackageName
{
  [newPackageName retain];
  [_packageName release];
  _packageName = newPackageName;
}

/**
 * The sub connector id of the sms connector or null if this is no sub connector.
 */
- (NSString *) subConnectorId
{
  return _subConnectorId;
}

/**
 * The sub connector id of the sms connector or null if this is no sub connector.
 */
- (void) setSubConnectorId: (NSString *) newSubConnectorId
{
  [newSubConnectorId retain];
  [_subConnectorId release];
  _subConnectorId = newSubConnectorId;
}

/**
 * The display name of the sms connector
 */
- (NSString *) name
{
  return _name;
}

/**
 * The display name of the sms connector
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The maximum sms length of the sms connector
 */
- (int) maxLength
{
  return _maxLength;
}

/**
 * The maximum sms length of the sms connector
 */
- (void) setMaxLength: (int) newMaxLength
{
  _maxLength = newMaxLength;
}

/**
 * The maximum sms recipients per sms for this connector
 */
- (int) maxRecipients
{
  return _maxRecipients;
}

/**
 * The maximum sms recipients per sms for this connector
 */
- (void) setMaxRecipients: (int) newMaxRecipients
{
  _maxRecipients = newMaxRecipients;
}

/**
 * A bit mask with possible sms encodings for this connector
 * 
 * bit 1 .. 7bit
 * bit 2 .. 8bit
 * bit 3 .. ucs2
 */
- (int) encodings
{
  return _encodings;
}

/**
 * A bit mask with possible sms encodings for this connector
 * 
 * bit 1 .. 7bit
 * bit 2 .. 8bit
 * bit 3 .. ucs2
 */
- (void) setEncodings: (int) newEncodings
{
  _encodings = newEncodings;
}

/**
 * The allowed recipient regex (i.e. for austria only: "43(650|676|660|664|669)") or null if their is no restriction.
 */
- (NSString *) recipientRegex
{
  return _recipientRegex;
}

/**
 * The allowed recipient regex (i.e. for austria only: "43(650|676|660|664|669)") or null if their is no restriction.
 */
- (void) setRecipientRegex: (NSString *) newRecipientRegex
{
  [newRecipientRegex retain];
  [_recipientRegex release];
  _recipientRegex = newRecipientRegex;
}

- (void) dealloc
{
  [self setPackageName: nil];
  [self setSubConnectorId: nil];
  [self setName: nil];
  [self setRecipientRegex: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsConnectorCreateRequest *_mYSMSAPINS0SmsConnectorCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsConnectorCreateRequest = (MYSMSAPINS0SmsConnectorCreateRequest *) [MYSMSAPINS0SmsConnectorCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsConnectorCreateRequest;
}

//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 MYSMSAPINS0SmsConnectorCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsConnectorCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsConnectorCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsConnectorCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsConnectorCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsConnectorCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsConnectorCreateRequest *_mYSMSAPINS0SmsConnectorCreateRequest = [[MYSMSAPINS0SmsConnectorCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsConnectorCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsConnectorCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsConnectorCreateRequest autorelease];
  return _mYSMSAPINS0SmsConnectorCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsConnectorCreateRequest 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 MYSMSAPINS0SmsConnectorCreateRequest 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 MYSMSAPINS0SmsConnectorCreateRequest from an XML reader. The element to be read is
 * "smsConnectorCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsConnectorCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsConnectorCreateRequest *_smsConnectorCreateRequest = 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 smsConnectorCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsConnectorCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsConnectorCreateRequest.");
#endif
    _smsConnectorCreateRequest = (MYSMSAPINS0SmsConnectorCreateRequest *)[MYSMSAPINS0SmsConnectorCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsConnectorCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorCreateRequest. Expected element smsConnectorCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsConnectorCreateRequest. Expected element smsConnectorCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsConnectorCreateRequest;
}

/**
 * Writes this MYSMSAPINS0SmsConnectorCreateRequest to XML under element name "smsConnectorCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsConnectorCreateRequest The SmsConnectorCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsConnectorCreateRequest 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 "smsConnectorCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsConnectorCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsConnectorCreateRequest for root element {}smsConnectorCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsConnectorCreateRequest for root element {}smsConnectorCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsConnectorCreateRequest. 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 "os", 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 setOs: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "packageName", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}packageName of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}packageName of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setPackageName: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "subConnectorId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}subConnectorId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}subConnectorId of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setSubConnectorId: __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 "maxLength", 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 setMaxLength: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "maxRecipients", 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 setMaxRecipients: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "encodings", 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 setEncodings: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "recipientRegex", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}recipientRegex of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}recipientRegex of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRecipientRegex: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "os", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}os."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}os...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_os);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}os...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}os."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}os."];
    }
  }
  if ([self packageName]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "packageName", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}packageName."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}packageName...");
#endif
    [[self packageName] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}packageName...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}packageName."];
    }
  }
  if ([self subConnectorId]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subConnectorId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}subConnectorId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}subConnectorId...");
#endif
    [[self subConnectorId] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}subConnectorId...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}subConnectorId."];
    }
  }
  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 (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxLength", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxLength."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}maxLength...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_maxLength);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}maxLength...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}maxLength."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxLength."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "maxRecipients", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}maxRecipients."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}maxRecipients...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_maxRecipients);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}maxRecipients...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}maxRecipients."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}maxRecipients."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "encodings", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}encodings."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}encodings...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_encodings);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}encodings...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}encodings."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}encodings."];
    }
  }
  if ([self recipientRegex]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipientRegex", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipientRegex."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}recipientRegex...");
#endif
    [[self recipientRegex] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}recipientRegex...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipientRegex."];
    }
  }
}
@end /* implementation MYSMSAPINS0SmsConnectorCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsConnectorCreateRequest_M */
#ifndef DEF_MYSMSAPINS0SmsSendSponsoredRequest_M
#define DEF_MYSMSAPINS0SmsSendSponsoredRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0SmsSendSponsoredRequest

/**
 * The recipient in international format (436761234567)
 */
- (long long) recipient
{
  return _recipient;
}

/**
 * The recipient in international format (436761234567)
 */
- (void) setRecipient: (long long) newRecipient
{
  _recipient = newRecipient;
}

/**
 * The message to send.
 * 
 * The message must contain a reference to mysms.com
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send.
 * 
 * The message must contain a reference to mysms.com
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

- (void) dealloc
{
  [self setMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0SmsSendSponsoredRequest *_mYSMSAPINS0SmsSendSponsoredRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0SmsSendSponsoredRequest = (MYSMSAPINS0SmsSendSponsoredRequest *) [MYSMSAPINS0SmsSendSponsoredRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0SmsSendSponsoredRequest;
}

//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 MYSMSAPINS0SmsSendSponsoredRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0SmsSendSponsoredRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0SmsSendSponsoredRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0SmsSendSponsoredRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0SmsSendSponsoredRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0SmsSendSponsoredRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0SmsSendSponsoredRequest *_mYSMSAPINS0SmsSendSponsoredRequest = [[MYSMSAPINS0SmsSendSponsoredRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0SmsSendSponsoredRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0SmsSendSponsoredRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0SmsSendSponsoredRequest autorelease];
  return _mYSMSAPINS0SmsSendSponsoredRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0SmsSendSponsoredRequest 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 MYSMSAPINS0SmsSendSponsoredRequest 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 MYSMSAPINS0SmsSendSponsoredRequest from an XML reader. The element to be read is
 * "smsSendSponsoredRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0SmsSendSponsoredRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0SmsSendSponsoredRequest *_smsSendSponsoredRequest = 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 smsSendSponsoredRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "smsSendSponsoredRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}smsSendSponsoredRequest.");
#endif
    _smsSendSponsoredRequest = (MYSMSAPINS0SmsSendSponsoredRequest *)[MYSMSAPINS0SmsSendSponsoredRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}smsSendSponsoredRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendSponsoredRequest. Expected element smsSendSponsoredRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0SmsSendSponsoredRequest. Expected element smsSendSponsoredRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _smsSendSponsoredRequest;
}

/**
 * Writes this MYSMSAPINS0SmsSendSponsoredRequest to XML under element name "smsSendSponsoredRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _smsSendSponsoredRequest The SmsSendSponsoredRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0SmsSendSponsoredRequest 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 "smsSendSponsoredRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}smsSendSponsoredRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}smsSendSponsoredRequest for root element {}smsSendSponsoredRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}smsSendSponsoredRequest for root element {}smsSendSponsoredRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}smsSendSponsoredRequest. 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 "recipient", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRecipient: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipient", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}recipient."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}recipient...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_recipient);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}recipient...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}recipient."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}recipient."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
}
@end /* implementation MYSMSAPINS0SmsSendSponsoredRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0SmsSendSponsoredRequest_M */
#ifndef DEF_MYSMSAPINS0ShopStartPaymentRequest_M
#define DEF_MYSMSAPINS0ShopStartPaymentRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopStartPaymentRequest

/**
 * (no documentation provided)
 */
- (int) productId
{
  return _productId;
}

/**
 * (no documentation provided)
 */
- (void) setProductId: (int) newProductId
{
  _productId = newProductId;
}

/**
 * (no documentation provided)
 */
- (int) paymentMethodId
{
  return _paymentMethodId;
}

/**
 * (no documentation provided)
 */
- (void) setPaymentMethodId: (int) newPaymentMethodId
{
  _paymentMethodId = newPaymentMethodId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopStartPaymentRequest *_mYSMSAPINS0ShopStartPaymentRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopStartPaymentRequest = (MYSMSAPINS0ShopStartPaymentRequest *) [MYSMSAPINS0ShopStartPaymentRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopStartPaymentRequest;
}

//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 MYSMSAPINS0ShopStartPaymentRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopStartPaymentRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopStartPaymentRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopStartPaymentRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopStartPaymentRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopStartPaymentRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopStartPaymentRequest *_mYSMSAPINS0ShopStartPaymentRequest = [[MYSMSAPINS0ShopStartPaymentRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopStartPaymentRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopStartPaymentRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopStartPaymentRequest autorelease];
  return _mYSMSAPINS0ShopStartPaymentRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopStartPaymentRequest 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 MYSMSAPINS0ShopStartPaymentRequest 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 MYSMSAPINS0ShopStartPaymentRequest from an XML reader. The element to be read is
 * "shopStartPaymentRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopStartPaymentRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopStartPaymentRequest *_shopStartPaymentRequest = 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 shopStartPaymentRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopStartPaymentRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopStartPaymentRequest.");
#endif
    _shopStartPaymentRequest = (MYSMSAPINS0ShopStartPaymentRequest *)[MYSMSAPINS0ShopStartPaymentRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopStartPaymentRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopStartPaymentRequest. Expected element shopStartPaymentRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopStartPaymentRequest. Expected element shopStartPaymentRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopStartPaymentRequest;
}

/**
 * Writes this MYSMSAPINS0ShopStartPaymentRequest to XML under element name "shopStartPaymentRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopStartPaymentRequest The ShopStartPaymentRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopStartPaymentRequest 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 "shopStartPaymentRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopStartPaymentRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopStartPaymentRequest for root element {}shopStartPaymentRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopStartPaymentRequest for root element {}shopStartPaymentRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopStartPaymentRequest. 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 "productId", 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 setProductId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "paymentMethodId", 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 setPaymentMethodId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_productId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}productId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "paymentMethodId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}paymentMethodId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}paymentMethodId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_paymentMethodId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}paymentMethodId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}paymentMethodId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}paymentMethodId."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopStartPaymentRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopStartPaymentRequest_M */
#ifndef DEF_MYSMSAPINS0ShopGetPaymentMethodsRequest_M
#define DEF_MYSMSAPINS0ShopGetPaymentMethodsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopGetPaymentMethodsRequest

/**
 * The product id to query the payment methods for
 */
- (int) productId
{
  return _productId;
}

/**
 * The product id to query the payment methods for
 */
- (void) setProductId: (int) newProductId
{
  _productId = newProductId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopGetPaymentMethodsRequest *_mYSMSAPINS0ShopGetPaymentMethodsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopGetPaymentMethodsRequest = (MYSMSAPINS0ShopGetPaymentMethodsRequest *) [MYSMSAPINS0ShopGetPaymentMethodsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopGetPaymentMethodsRequest;
}

//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 MYSMSAPINS0ShopGetPaymentMethodsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopGetPaymentMethodsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopGetPaymentMethodsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopGetPaymentMethodsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopGetPaymentMethodsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopGetPaymentMethodsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopGetPaymentMethodsRequest *_mYSMSAPINS0ShopGetPaymentMethodsRequest = [[MYSMSAPINS0ShopGetPaymentMethodsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopGetPaymentMethodsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopGetPaymentMethodsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopGetPaymentMethodsRequest autorelease];
  return _mYSMSAPINS0ShopGetPaymentMethodsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopGetPaymentMethodsRequest 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 MYSMSAPINS0ShopGetPaymentMethodsRequest 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 MYSMSAPINS0ShopGetPaymentMethodsRequest from an XML reader. The element to be read is
 * "shopGetPaymentMethodsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopGetPaymentMethodsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopGetPaymentMethodsRequest *_shopGetPaymentMethodsRequest = 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 shopGetPaymentMethodsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopGetPaymentMethodsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopGetPaymentMethodsRequest.");
#endif
    _shopGetPaymentMethodsRequest = (MYSMSAPINS0ShopGetPaymentMethodsRequest *)[MYSMSAPINS0ShopGetPaymentMethodsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopGetPaymentMethodsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopGetPaymentMethodsRequest. Expected element shopGetPaymentMethodsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopGetPaymentMethodsRequest. Expected element shopGetPaymentMethodsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopGetPaymentMethodsRequest;
}

/**
 * Writes this MYSMSAPINS0ShopGetPaymentMethodsRequest to XML under element name "shopGetPaymentMethodsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopGetPaymentMethodsRequest The ShopGetPaymentMethodsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopGetPaymentMethodsRequest 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 "shopGetPaymentMethodsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopGetPaymentMethodsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopGetPaymentMethodsRequest for root element {}shopGetPaymentMethodsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopGetPaymentMethodsRequest for root element {}shopGetPaymentMethodsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopGetPaymentMethodsRequest. 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 "productId", 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 setProductId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_productId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}productId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productId."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopGetPaymentMethodsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopGetPaymentMethodsRequest_M */
#ifndef DEF_MYSMSAPINS0ShopCheckPaymentRequest_M
#define DEF_MYSMSAPINS0ShopCheckPaymentRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ShopCheckPaymentRequest

/**
 * The transaction id return by the start payment call.
 */
- (int) transactionId
{
  return _transactionId;
}

/**
 * The transaction id return by the start payment call.
 */
- (void) setTransactionId: (int) newTransactionId
{
  _transactionId = newTransactionId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ShopCheckPaymentRequest *_mYSMSAPINS0ShopCheckPaymentRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ShopCheckPaymentRequest = (MYSMSAPINS0ShopCheckPaymentRequest *) [MYSMSAPINS0ShopCheckPaymentRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ShopCheckPaymentRequest;
}

//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 MYSMSAPINS0ShopCheckPaymentRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ShopCheckPaymentRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ShopCheckPaymentRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ShopCheckPaymentRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ShopCheckPaymentRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ShopCheckPaymentRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ShopCheckPaymentRequest *_mYSMSAPINS0ShopCheckPaymentRequest = [[MYSMSAPINS0ShopCheckPaymentRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ShopCheckPaymentRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ShopCheckPaymentRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ShopCheckPaymentRequest autorelease];
  return _mYSMSAPINS0ShopCheckPaymentRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ShopCheckPaymentRequest 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 MYSMSAPINS0ShopCheckPaymentRequest 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 MYSMSAPINS0ShopCheckPaymentRequest from an XML reader. The element to be read is
 * "shopCheckPaymentRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ShopCheckPaymentRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ShopCheckPaymentRequest *_shopCheckPaymentRequest = 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 shopCheckPaymentRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "shopCheckPaymentRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}shopCheckPaymentRequest.");
#endif
    _shopCheckPaymentRequest = (MYSMSAPINS0ShopCheckPaymentRequest *)[MYSMSAPINS0ShopCheckPaymentRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}shopCheckPaymentRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopCheckPaymentRequest. Expected element shopCheckPaymentRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ShopCheckPaymentRequest. Expected element shopCheckPaymentRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _shopCheckPaymentRequest;
}

/**
 * Writes this MYSMSAPINS0ShopCheckPaymentRequest to XML under element name "shopCheckPaymentRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _shopCheckPaymentRequest The ShopCheckPaymentRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ShopCheckPaymentRequest 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 "shopCheckPaymentRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}shopCheckPaymentRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}shopCheckPaymentRequest for root element {}shopCheckPaymentRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}shopCheckPaymentRequest for root element {}shopCheckPaymentRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}shopCheckPaymentRequest. 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 "transactionId", 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 setTransactionId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "transactionId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}transactionId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}transactionId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_transactionId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}transactionId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}transactionId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}transactionId."];
    }
  }
}
@end /* implementation MYSMSAPINS0ShopCheckPaymentRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ShopCheckPaymentRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsSendRequest_M
#define DEF_MYSMSAPINS0RemoteSmsSendRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsSendRequest

/**
 * The recipients in international format (+436761234567)
 */
- (NSArray *) recipients
{
  return _recipients;
}

/**
 * The recipients in international format (+436761234567)
 */
- (void) setRecipients: (NSArray *) newRecipients
{
  [newRecipients retain];
  [_recipients release];
  _recipients = newRecipients;
}

/**
 * The message to send
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (NSDate *) dateSendOn
{
  return _dateSendOn;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (void) setDateSendOn: (NSDate *) newDateSendOn
{
  [newDateSendOn retain];
  [_dateSendOn release];
  _dateSendOn = newDateSendOn;
}

/**
 * The encoding for the message (0 => 7-bit, 1 => 8-bit, 2 => UCS2)
 */
- (int) encoding
{
  return _encoding;
}

/**
 * The encoding for the message (0 => 7-bit, 1 => 8-bit, 2 => UCS2)
 */
- (void) setEncoding: (int) newEncoding
{
  _encoding = newEncoding;
}

/**
 * The sms connector id to be used (optional). Leave zero for normal operator sms.
 */
- (int) smsConnectorId
{
  return _smsConnectorId;
}

/**
 * The sms connector id to be used (optional). Leave zero for normal operator sms.
 */
- (void) setSmsConnectorId: (int) newSmsConnectorId
{
  _smsConnectorId = newSmsConnectorId;
}

/**
 * True if the messages should be stored on the server as outgoing messages. In case of failed delivery the will be marked as unsent.
 */
- (BOOL) store
{
  return _store;
}

/**
 * True if the messages should be stored on the server as outgoing messages. In case of failed delivery the will be marked as unsent.
 */
- (void) setStore: (BOOL) newStore
{
  _store = newStore;
}

- (void) dealloc
{
  [self setRecipients: nil];
  [self setMessage: nil];
  [self setDateSendOn: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsSendRequest *_mYSMSAPINS0RemoteSmsSendRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsSendRequest = (MYSMSAPINS0RemoteSmsSendRequest *) [MYSMSAPINS0RemoteSmsSendRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsSendRequest;
}

//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 MYSMSAPINS0RemoteSmsSendRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsSendRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsSendRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsSendRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsSendRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsSendRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsSendRequest *_mYSMSAPINS0RemoteSmsSendRequest = [[MYSMSAPINS0RemoteSmsSendRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsSendRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsSendRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsSendRequest autorelease];
  return _mYSMSAPINS0RemoteSmsSendRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsSendRequest 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 MYSMSAPINS0RemoteSmsSendRequest 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 MYSMSAPINS0RemoteSmsSendRequest from an XML reader. The element to be read is
 * "remoteSmsSendRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsSendRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsSendRequest *_remoteSmsSendRequest = 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 remoteSmsSendRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsSendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsSendRequest.");
#endif
    _remoteSmsSendRequest = (MYSMSAPINS0RemoteSmsSendRequest *)[MYSMSAPINS0RemoteSmsSendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsSendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSendRequest. Expected element remoteSmsSendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsSendRequest. Expected element remoteSmsSendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsSendRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSendRequest to XML under element name "remoteSmsSendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsSendRequest The RemoteSmsSendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsSendRequest 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 "remoteSmsSendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsSendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsSendRequest for root element {}remoteSmsSendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsSendRequest for root element {}remoteSmsSendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsSendRequest. 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 "recipients", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}recipients of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

     __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}recipients of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    if ([self recipients]) {
      [self setRecipients: [[self recipients] arrayByAddingObject: __child]];
    }
    else {
      [self setRecipients: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSendOn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSendOn: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "encoding", 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 setEncoding: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsConnectorId", 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 setSmsConnectorId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "store", 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 setStore: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self recipients]) {
    __enumerator = [[self recipients] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "recipients", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}recipients."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}recipients...");
#endif
      [__item writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}recipients...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}recipients."];
      }
    } //end item iterator.
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if ([self dateSendOn]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSendOn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSendOn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSendOn...");
#endif
    [[self dateSendOn] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSendOn...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSendOn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "encoding", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}encoding."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}encoding...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_encoding);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}encoding...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}encoding."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}encoding."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnectorId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnectorId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsConnectorId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsConnectorId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsConnectorId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsConnectorId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsConnectorId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "store", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}store."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}store...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_store);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}store...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}store."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}store."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsSendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsSendRequest_M */
#ifndef DEF_MYSMSAPINS0GroupCreateRequest_M
#define DEF_MYSMSAPINS0GroupCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupCreateRequest

/**
 * The name of the group.
 */
- (NSString *) name
{
  return _name;
}

/**
 * The name of the group.
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

/**
 * The msisdns of the user's that should be invited to the group in international format (436761234567).
 * 
 * There must be at least one msisdn.
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdns of the user's that should be invited to the group in international format (436761234567).
 * 
 * There must be at least one msisdn.
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

- (void) dealloc
{
  [self setName: nil];
  [self setMsisdns: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupCreateRequest *_mYSMSAPINS0GroupCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupCreateRequest = (MYSMSAPINS0GroupCreateRequest *) [MYSMSAPINS0GroupCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupCreateRequest;
}

//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 MYSMSAPINS0GroupCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupCreateRequest *_mYSMSAPINS0GroupCreateRequest = [[MYSMSAPINS0GroupCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupCreateRequest autorelease];
  return _mYSMSAPINS0GroupCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupCreateRequest 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 MYSMSAPINS0GroupCreateRequest 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 MYSMSAPINS0GroupCreateRequest from an XML reader. The element to be read is
 * "groupCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupCreateRequest *_groupCreateRequest = 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 groupCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupCreateRequest.");
#endif
    _groupCreateRequest = (MYSMSAPINS0GroupCreateRequest *)[MYSMSAPINS0GroupCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupCreateRequest. Expected element groupCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupCreateRequest. Expected element groupCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupCreateRequest;
}

/**
 * Writes this MYSMSAPINS0GroupCreateRequest to XML under element name "groupCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupCreateRequest The GroupCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupCreateRequest 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 "groupCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupCreateRequest for root element {}groupCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupCreateRequest for root element {}groupCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupCreateRequest. XML writer status: %i\n", rc];
  }
}

//documentation inherited.
- (BOOL) readJAXBAttribute: (xmlTextReaderPtr) reader
{
  void *_child_accessor;

  if ([super readJAXBAttribute: reader]) {
    return YES;
  }

  return NO;
}

//documentation inherited.
- (BOOL) readJAXBValue: (xmlTextReaderPtr) reader
{
  return [super readJAXBValue: reader];
}

//documentation inherited.
- (BOOL) readJAXBChildElement: (xmlTextReaderPtr) reader
{
  id __child;
  void *_child_accessor;
  int status, depth;

  if ([super readJAXBChildElement: reader]) {
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setName: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdns", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(long long)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    if ([self msisdns]) {
      [self setMsisdns: [[self msisdns] arrayByAddingObject: __child]];
    }
    else {
      [self setMsisdns: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self name]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}name."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}name...");
#endif
    [[self name] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}name...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}name."];
    }
  }
  if ([self msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdns", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}msisdns."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}msisdns...");
#endif
      status = xmlTextWriterWriteLongType(writer, ((long long*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}msisdns."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}msisdns...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}msisdns."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0GroupCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupCreateRequest_M */
#ifndef DEF_MYSMSAPINS0GroupGetUsersRequest_M
#define DEF_MYSMSAPINS0GroupGetUsersRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupGetUsersRequest

/**
 * The group id of the group.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of the group.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupGetUsersRequest *_mYSMSAPINS0GroupGetUsersRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupGetUsersRequest = (MYSMSAPINS0GroupGetUsersRequest *) [MYSMSAPINS0GroupGetUsersRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupGetUsersRequest;
}

//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 MYSMSAPINS0GroupGetUsersRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupGetUsersRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupGetUsersRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupGetUsersRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupGetUsersRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupGetUsersRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupGetUsersRequest *_mYSMSAPINS0GroupGetUsersRequest = [[MYSMSAPINS0GroupGetUsersRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupGetUsersRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupGetUsersRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupGetUsersRequest autorelease];
  return _mYSMSAPINS0GroupGetUsersRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupGetUsersRequest 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 MYSMSAPINS0GroupGetUsersRequest 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 MYSMSAPINS0GroupGetUsersRequest from an XML reader. The element to be read is
 * "groupGetUsersRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupGetUsersRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupGetUsersRequest *_groupGetUsersRequest = 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 groupGetUsersRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupGetUsersRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupGetUsersRequest.");
#endif
    _groupGetUsersRequest = (MYSMSAPINS0GroupGetUsersRequest *)[MYSMSAPINS0GroupGetUsersRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupGetUsersRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupGetUsersRequest. Expected element groupGetUsersRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupGetUsersRequest. Expected element groupGetUsersRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupGetUsersRequest;
}

/**
 * Writes this MYSMSAPINS0GroupGetUsersRequest to XML under element name "groupGetUsersRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupGetUsersRequest The GroupGetUsersRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupGetUsersRequest 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 "groupGetUsersRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupGetUsersRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupGetUsersRequest for root element {}groupGetUsersRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupGetUsersRequest for root element {}groupGetUsersRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupGetUsersRequest. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}groupId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_groupId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}groupId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}groupId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
}
@end /* implementation MYSMSAPINS0GroupGetUsersRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupGetUsersRequest_M */
#ifndef DEF_MYSMSAPINS0GroupLeaveRequest_M
#define DEF_MYSMSAPINS0GroupLeaveRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupLeaveRequest

/**
 * The group id of the group.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of the group.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

/**
 * The group ids of the groups to leave.
 */
- (NSArray *) groupIds
{
  return _groupIds;
}

/**
 * The group ids of the groups to leave.
 */
- (void) setGroupIds: (NSArray *) newGroupIds
{
  [newGroupIds retain];
  [_groupIds release];
  _groupIds = newGroupIds;
}

/**
 * If true a info message about to leave is send to the user leaving otherwise it will only be send to the users that are still in the group.
 */
- (BOOL) quiet
{
  return _quiet;
}

/**
 * If true a info message about to leave is send to the user leaving otherwise it will only be send to the users that are still in the group.
 */
- (void) setQuiet: (BOOL) newQuiet
{
  _quiet = newQuiet;
}

- (void) dealloc
{
  [self setGroupIds: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupLeaveRequest *_mYSMSAPINS0GroupLeaveRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupLeaveRequest = (MYSMSAPINS0GroupLeaveRequest *) [MYSMSAPINS0GroupLeaveRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupLeaveRequest;
}

//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 MYSMSAPINS0GroupLeaveRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupLeaveRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupLeaveRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupLeaveRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupLeaveRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupLeaveRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupLeaveRequest *_mYSMSAPINS0GroupLeaveRequest = [[MYSMSAPINS0GroupLeaveRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupLeaveRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupLeaveRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupLeaveRequest autorelease];
  return _mYSMSAPINS0GroupLeaveRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupLeaveRequest 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 MYSMSAPINS0GroupLeaveRequest 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 MYSMSAPINS0GroupLeaveRequest from an XML reader. The element to be read is
 * "groupLeaveRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupLeaveRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupLeaveRequest *_groupLeaveRequest = 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 groupLeaveRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupLeaveRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupLeaveRequest.");
#endif
    _groupLeaveRequest = (MYSMSAPINS0GroupLeaveRequest *)[MYSMSAPINS0GroupLeaveRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupLeaveRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupLeaveRequest. Expected element groupLeaveRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupLeaveRequest. Expected element groupLeaveRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupLeaveRequest;
}

/**
 * Writes this MYSMSAPINS0GroupLeaveRequest to XML under element name "groupLeaveRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupLeaveRequest The GroupLeaveRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupLeaveRequest 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 "groupLeaveRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupLeaveRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupLeaveRequest for root element {}groupLeaveRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupLeaveRequest for root element {}groupLeaveRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupLeaveRequest. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "groupIds", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}groupIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    _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."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(int)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}groupIds of type {http://www.w3.org/2001/XMLSchema}int.");
#endif

    if ([self groupIds]) {
      [self setGroupIds: [[self groupIds] arrayByAddingObject: __child]];
    }
    else {
      [self setGroupIds: [NSArray arrayWithObject: __child]];
    }
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "quiet", 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 setQuiet: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}groupId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_groupId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}groupId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}groupId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
  if ([self groupIds]) {
    __enumerator = [[self groupIds] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupIds", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}groupIds."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}groupIds...");
#endif
      status = xmlTextWriterWriteIntType(writer, ((int*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}groupIds."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}groupIds...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}groupIds."];
      }
    } //end item iterator.
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "quiet", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}quiet."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}quiet...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_quiet);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}quiet...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}quiet."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}quiet."];
    }
  }
}
@end /* implementation MYSMSAPINS0GroupLeaveRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupLeaveRequest_M */
#ifndef DEF_MYSMSAPINS0GroupSendMessageRequest_M
#define DEF_MYSMSAPINS0GroupSendMessageRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupSendMessageRequest

/**
 * The group id of the group in this message should be send.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of the group in this message should be send.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

/**
 * The message to send
 */
- (NSString *) message
{
  return _message;
}

/**
 * The message to send
 */
- (void) setMessage: (NSString *) newMessage
{
  [newMessage retain];
  [_message release];
  _message = newMessage;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (NSDate *) dateSendOn
{
  return _dateSendOn;
}

/**
 * The optional date when the message should be delivered.
 * If not given it will be delivered immediately.
 */
- (void) setDateSendOn: (NSDate *) newDateSendOn
{
  [newDateSendOn retain];
  [_dateSendOn release];
  _dateSendOn = newDateSendOn;
}

/**
 * The registered device id for the device if their is one.
 */
- (int) deviceId
{
  return _deviceId;
}

/**
 * The registered device id for the device if their is one.
 */
- (void) setDeviceId: (int) newDeviceId
{
  _deviceId = newDeviceId;
}

- (void) dealloc
{
  [self setMessage: nil];
  [self setDateSendOn: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupSendMessageRequest *_mYSMSAPINS0GroupSendMessageRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupSendMessageRequest = (MYSMSAPINS0GroupSendMessageRequest *) [MYSMSAPINS0GroupSendMessageRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupSendMessageRequest;
}

//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 MYSMSAPINS0GroupSendMessageRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupSendMessageRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupSendMessageRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupSendMessageRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupSendMessageRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupSendMessageRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupSendMessageRequest *_mYSMSAPINS0GroupSendMessageRequest = [[MYSMSAPINS0GroupSendMessageRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupSendMessageRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupSendMessageRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupSendMessageRequest autorelease];
  return _mYSMSAPINS0GroupSendMessageRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupSendMessageRequest 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 MYSMSAPINS0GroupSendMessageRequest 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 MYSMSAPINS0GroupSendMessageRequest from an XML reader. The element to be read is
 * "groupSendMessageRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupSendMessageRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupSendMessageRequest *_groupSendMessageRequest = 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 groupSendMessageRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupSendMessageRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupSendMessageRequest.");
#endif
    _groupSendMessageRequest = (MYSMSAPINS0GroupSendMessageRequest *)[MYSMSAPINS0GroupSendMessageRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupSendMessageRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupSendMessageRequest. Expected element groupSendMessageRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupSendMessageRequest. Expected element groupSendMessageRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupSendMessageRequest;
}

/**
 * Writes this MYSMSAPINS0GroupSendMessageRequest to XML under element name "groupSendMessageRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupSendMessageRequest The GroupSendMessageRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupSendMessageRequest 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 "groupSendMessageRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupSendMessageRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupSendMessageRequest for root element {}groupSendMessageRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupSendMessageRequest for root element {}groupSendMessageRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupSendMessageRequest. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "message", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}message of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setMessage: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "dateSendOn", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif
    __child = [NSDate readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}dateSendOn of type {http://www.w3.org/2001/XMLSchema}dateTime.");
#endif

    [self setDateSendOn: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "deviceId", 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 setDeviceId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}groupId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_groupId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}groupId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}groupId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
  if ([self message]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "message", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}message."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}message...");
#endif
    [[self message] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}message...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}message."];
    }
  }
  if ([self dateSendOn]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dateSendOn", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}dateSendOn."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}dateSendOn...");
#endif
    [[self dateSendOn] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}dateSendOn...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}dateSendOn."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "deviceId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}deviceId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}deviceId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_deviceId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}deviceId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}deviceId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}deviceId."];
    }
  }
}
@end /* implementation MYSMSAPINS0GroupSendMessageRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupSendMessageRequest_M */
#ifndef DEF_MYSMSAPINS0GroupRenameRequest_M
#define DEF_MYSMSAPINS0GroupRenameRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupRenameRequest

/**
 * The group id of the group.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of the group.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

/**
 * The new name of the group.
 */
- (NSString *) name
{
  return _name;
}

/**
 * The new name of the group.
 */
- (void) setName: (NSString *) newName
{
  [newName retain];
  [_name release];
  _name = newName;
}

- (void) dealloc
{
  [self setName: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupRenameRequest *_mYSMSAPINS0GroupRenameRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupRenameRequest = (MYSMSAPINS0GroupRenameRequest *) [MYSMSAPINS0GroupRenameRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupRenameRequest;
}

//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 MYSMSAPINS0GroupRenameRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupRenameRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupRenameRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupRenameRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupRenameRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupRenameRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupRenameRequest *_mYSMSAPINS0GroupRenameRequest = [[MYSMSAPINS0GroupRenameRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupRenameRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupRenameRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupRenameRequest autorelease];
  return _mYSMSAPINS0GroupRenameRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupRenameRequest 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 MYSMSAPINS0GroupRenameRequest 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 MYSMSAPINS0GroupRenameRequest from an XML reader. The element to be read is
 * "groupRenameRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupRenameRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupRenameRequest *_groupRenameRequest = 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 groupRenameRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupRenameRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupRenameRequest.");
#endif
    _groupRenameRequest = (MYSMSAPINS0GroupRenameRequest *)[MYSMSAPINS0GroupRenameRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupRenameRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupRenameRequest. Expected element groupRenameRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupRenameRequest. Expected element groupRenameRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupRenameRequest;
}

/**
 * Writes this MYSMSAPINS0GroupRenameRequest to XML under element name "groupRenameRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupRenameRequest The GroupRenameRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupRenameRequest 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 "groupRenameRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupRenameRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupRenameRequest for root element {}groupRenameRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupRenameRequest for root element {}groupRenameRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupRenameRequest. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}groupId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_groupId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}groupId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}groupId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
  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 MYSMSAPINS0GroupRenameRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupRenameRequest_M */
#ifndef DEF_MYSMSAPINS0GroupInviteUsersRequest_M
#define DEF_MYSMSAPINS0GroupInviteUsersRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupInviteUsersRequest

/**
 * The group id of the group.
 */
- (int) groupId
{
  return _groupId;
}

/**
 * The group id of the group.
 */
- (void) setGroupId: (int) newGroupId
{
  _groupId = newGroupId;
}

/**
 * The msisdns of the user's that should be invited to the group in international format (436761234567).
 * 
 * There must be at least one msisdn.
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdns of the user's that should be invited to the group in international format (436761234567).
 * 
 * There must be at least one msisdn.
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

- (void) dealloc
{
  [self setMsisdns: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupInviteUsersRequest *_mYSMSAPINS0GroupInviteUsersRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupInviteUsersRequest = (MYSMSAPINS0GroupInviteUsersRequest *) [MYSMSAPINS0GroupInviteUsersRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupInviteUsersRequest;
}

//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 MYSMSAPINS0GroupInviteUsersRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupInviteUsersRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupInviteUsersRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupInviteUsersRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupInviteUsersRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupInviteUsersRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupInviteUsersRequest *_mYSMSAPINS0GroupInviteUsersRequest = [[MYSMSAPINS0GroupInviteUsersRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupInviteUsersRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupInviteUsersRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupInviteUsersRequest autorelease];
  return _mYSMSAPINS0GroupInviteUsersRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupInviteUsersRequest 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 MYSMSAPINS0GroupInviteUsersRequest 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 MYSMSAPINS0GroupInviteUsersRequest from an XML reader. The element to be read is
 * "groupInviteUsersRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupInviteUsersRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupInviteUsersRequest *_groupInviteUsersRequest = 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 groupInviteUsersRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupInviteUsersRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupInviteUsersRequest.");
#endif
    _groupInviteUsersRequest = (MYSMSAPINS0GroupInviteUsersRequest *)[MYSMSAPINS0GroupInviteUsersRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupInviteUsersRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupInviteUsersRequest. Expected element groupInviteUsersRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupInviteUsersRequest. Expected element groupInviteUsersRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupInviteUsersRequest;
}

/**
 * Writes this MYSMSAPINS0GroupInviteUsersRequest to XML under element name "groupInviteUsersRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupInviteUsersRequest The GroupInviteUsersRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupInviteUsersRequest 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 "groupInviteUsersRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupInviteUsersRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupInviteUsersRequest for root element {}groupInviteUsersRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupInviteUsersRequest for root element {}groupInviteUsersRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupInviteUsersRequest. 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 "groupId", 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 setGroupId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdns", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(long long)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    if ([self msisdns]) {
      [self setMsisdns: [[self msisdns] arrayByAddingObject: __child]];
    }
    else {
      [self setMsisdns: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "groupId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}groupId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}groupId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_groupId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}groupId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}groupId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}groupId."];
    }
  }
  if ([self msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdns", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}msisdns."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}msisdns...");
#endif
      status = xmlTextWriterWriteLongType(writer, ((long long*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}msisdns."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}msisdns...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}msisdns."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0GroupInviteUsersRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupInviteUsersRequest_M */
#ifndef DEF_MYSMSAPINS0GroupGetGroupsRequest_M
#define DEF_MYSMSAPINS0GroupGetGroupsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0GroupGetGroupsRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0GroupGetGroupsRequest *_mYSMSAPINS0GroupGetGroupsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0GroupGetGroupsRequest = (MYSMSAPINS0GroupGetGroupsRequest *) [MYSMSAPINS0GroupGetGroupsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0GroupGetGroupsRequest;
}

//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 MYSMSAPINS0GroupGetGroupsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0GroupGetGroupsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0GroupGetGroupsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0GroupGetGroupsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0GroupGetGroupsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0GroupGetGroupsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0GroupGetGroupsRequest *_mYSMSAPINS0GroupGetGroupsRequest = [[MYSMSAPINS0GroupGetGroupsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0GroupGetGroupsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0GroupGetGroupsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0GroupGetGroupsRequest autorelease];
  return _mYSMSAPINS0GroupGetGroupsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0GroupGetGroupsRequest 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 MYSMSAPINS0GroupGetGroupsRequest 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 MYSMSAPINS0GroupGetGroupsRequest from an XML reader. The element to be read is
 * "groupGetGroupsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0GroupGetGroupsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0GroupGetGroupsRequest *_groupGetGroupsRequest = 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 groupGetGroupsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "groupGetGroupsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}groupGetGroupsRequest.");
#endif
    _groupGetGroupsRequest = (MYSMSAPINS0GroupGetGroupsRequest *)[MYSMSAPINS0GroupGetGroupsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}groupGetGroupsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupGetGroupsRequest. Expected element groupGetGroupsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0GroupGetGroupsRequest. Expected element groupGetGroupsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _groupGetGroupsRequest;
}

/**
 * Writes this MYSMSAPINS0GroupGetGroupsRequest to XML under element name "groupGetGroupsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _groupGetGroupsRequest The GroupGetGroupsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0GroupGetGroupsRequest 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 "groupGetGroupsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}groupGetGroupsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}groupGetGroupsRequest for root element {}groupGetGroupsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}groupGetGroupsRequest for root element {}groupGetGroupsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}groupGetGroupsRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0GroupGetGroupsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0GroupGetGroupsRequest_M */
#ifndef DEF_MYSMSAPINS0CrmMessageClickedRequest_M
#define DEF_MYSMSAPINS0CrmMessageClickedRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0CrmMessageClickedRequest

/**
 * The crm message id of the crm message which should be marked as viewed.
 */
- (int) crmMessageId
{
  return _crmMessageId;
}

/**
 * The crm message id of the crm message which should be marked as viewed.
 */
- (void) setCrmMessageId: (int) newCrmMessageId
{
  _crmMessageId = newCrmMessageId;
}

/**
 * The button which has been clicked.
 * 
 * 1 .. close<br>
 * 2 .. view later<br>
 * 3 .. market review<br>
 * 4 .. invite friends<br>
 * 5 .. app update<br>
 */
- (int) button
{
  return _button;
}

/**
 * The button which has been clicked.
 * 
 * 1 .. close<br>
 * 2 .. view later<br>
 * 3 .. market review<br>
 * 4 .. invite friends<br>
 * 5 .. app update<br>
 */
- (void) setButton: (int) newButton
{
  _button = newButton;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0CrmMessageClickedRequest *_mYSMSAPINS0CrmMessageClickedRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0CrmMessageClickedRequest = (MYSMSAPINS0CrmMessageClickedRequest *) [MYSMSAPINS0CrmMessageClickedRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0CrmMessageClickedRequest;
}

//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 MYSMSAPINS0CrmMessageClickedRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0CrmMessageClickedRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0CrmMessageClickedRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0CrmMessageClickedRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0CrmMessageClickedRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0CrmMessageClickedRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0CrmMessageClickedRequest *_mYSMSAPINS0CrmMessageClickedRequest = [[MYSMSAPINS0CrmMessageClickedRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0CrmMessageClickedRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0CrmMessageClickedRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0CrmMessageClickedRequest autorelease];
  return _mYSMSAPINS0CrmMessageClickedRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0CrmMessageClickedRequest 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 MYSMSAPINS0CrmMessageClickedRequest 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 MYSMSAPINS0CrmMessageClickedRequest from an XML reader. The element to be read is
 * "crmMessageClickedRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0CrmMessageClickedRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0CrmMessageClickedRequest *_crmMessageClickedRequest = 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 crmMessageClickedRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "crmMessageClickedRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}crmMessageClickedRequest.");
#endif
    _crmMessageClickedRequest = (MYSMSAPINS0CrmMessageClickedRequest *)[MYSMSAPINS0CrmMessageClickedRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}crmMessageClickedRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0CrmMessageClickedRequest. Expected element crmMessageClickedRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0CrmMessageClickedRequest. Expected element crmMessageClickedRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _crmMessageClickedRequest;
}

/**
 * Writes this MYSMSAPINS0CrmMessageClickedRequest to XML under element name "crmMessageClickedRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _crmMessageClickedRequest The CrmMessageClickedRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0CrmMessageClickedRequest 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 "crmMessageClickedRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}crmMessageClickedRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}crmMessageClickedRequest for root element {}crmMessageClickedRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}crmMessageClickedRequest for root element {}crmMessageClickedRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}crmMessageClickedRequest. 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 "crmMessageId", 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 setCrmMessageId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "button", 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 setButton: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "crmMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}crmMessageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}crmMessageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_crmMessageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}crmMessageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}crmMessageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}crmMessageId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "button", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}button."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}button...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_button);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}button...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}button."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}button."];
    }
  }
}
@end /* implementation MYSMSAPINS0CrmMessageClickedRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0CrmMessageClickedRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteCallFailedRequest_M
#define DEF_MYSMSAPINS0RemoteCallFailedRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallFailedRequest

/**
 * The remote call initiate request id.
 */
- (long long) requestId
{
  return _requestId;
}

/**
 * The remote call initiate request id.
 */
- (void) setRequestId: (long long) newRequestId
{
  _requestId = newRequestId;
}

/**
 * The error message
 */
- (NSString *) errorMessage
{
  return _errorMessage;
}

/**
 * The error message
 */
- (void) setErrorMessage: (NSString *) newErrorMessage
{
  [newErrorMessage retain];
  [_errorMessage release];
  _errorMessage = newErrorMessage;
}

- (void) dealloc
{
  [self setErrorMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallFailedRequest *_mYSMSAPINS0RemoteCallFailedRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallFailedRequest = (MYSMSAPINS0RemoteCallFailedRequest *) [MYSMSAPINS0RemoteCallFailedRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallFailedRequest;
}

//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 MYSMSAPINS0RemoteCallFailedRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallFailedRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallFailedRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallFailedRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallFailedRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallFailedRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallFailedRequest *_mYSMSAPINS0RemoteCallFailedRequest = [[MYSMSAPINS0RemoteCallFailedRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallFailedRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallFailedRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallFailedRequest autorelease];
  return _mYSMSAPINS0RemoteCallFailedRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallFailedRequest 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 MYSMSAPINS0RemoteCallFailedRequest 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 MYSMSAPINS0RemoteCallFailedRequest from an XML reader. The element to be read is
 * "remoteCallFailedRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallFailedRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallFailedRequest *_remoteCallFailedRequest = 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 remoteCallFailedRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallFailedRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallFailedRequest.");
#endif
    _remoteCallFailedRequest = (MYSMSAPINS0RemoteCallFailedRequest *)[MYSMSAPINS0RemoteCallFailedRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallFailedRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallFailedRequest. Expected element remoteCallFailedRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallFailedRequest. Expected element remoteCallFailedRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallFailedRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteCallFailedRequest to XML under element name "remoteCallFailedRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallFailedRequest The RemoteCallFailedRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallFailedRequest 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 "remoteCallFailedRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallFailedRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallFailedRequest for root element {}remoteCallFailedRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallFailedRequest for root element {}remoteCallFailedRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallFailedRequest. 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 "requestId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRequestId: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "errorMessage", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}errorMessage of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}errorMessage of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setErrorMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}requestId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}requestId...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_requestId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}requestId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}requestId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}requestId."];
    }
  }
  if ([self errorMessage]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "errorMessage", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}errorMessage."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}errorMessage...");
#endif
    [[self errorMessage] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}errorMessage...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}errorMessage."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteCallFailedRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallFailedRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteCallInitiateRequest_M
#define DEF_MYSMSAPINS0RemoteCallInitiateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallInitiateRequest

/**
 * The address in international format (+436761234567)
 */
- (NSString *) address
{
  return _address;
}

/**
 * The address in international format (+436761234567)
 */
- (void) setAddress: (NSString *) newAddress
{
  [newAddress retain];
  [_address release];
  _address = newAddress;
}

- (void) dealloc
{
  [self setAddress: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallInitiateRequest *_mYSMSAPINS0RemoteCallInitiateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallInitiateRequest = (MYSMSAPINS0RemoteCallInitiateRequest *) [MYSMSAPINS0RemoteCallInitiateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallInitiateRequest;
}

//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 MYSMSAPINS0RemoteCallInitiateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallInitiateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallInitiateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallInitiateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallInitiateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallInitiateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallInitiateRequest *_mYSMSAPINS0RemoteCallInitiateRequest = [[MYSMSAPINS0RemoteCallInitiateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallInitiateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallInitiateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallInitiateRequest autorelease];
  return _mYSMSAPINS0RemoteCallInitiateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallInitiateRequest 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 MYSMSAPINS0RemoteCallInitiateRequest 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 MYSMSAPINS0RemoteCallInitiateRequest from an XML reader. The element to be read is
 * "remoteCallInitiateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallInitiateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallInitiateRequest *_remoteCallInitiateRequest = 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 remoteCallInitiateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallInitiateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallInitiateRequest.");
#endif
    _remoteCallInitiateRequest = (MYSMSAPINS0RemoteCallInitiateRequest *)[MYSMSAPINS0RemoteCallInitiateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallInitiateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallInitiateRequest. Expected element remoteCallInitiateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallInitiateRequest. Expected element remoteCallInitiateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallInitiateRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteCallInitiateRequest to XML under element name "remoteCallInitiateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallInitiateRequest The RemoteCallInitiateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallInitiateRequest 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 "remoteCallInitiateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallInitiateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallInitiateRequest for root element {}remoteCallInitiateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallInitiateRequest for root element {}remoteCallInitiateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallInitiateRequest. 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 "address", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}address of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAddress: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self address]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "address", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}address."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}address...");
#endif
    [[self address] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}address...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}address."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteCallInitiateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallInitiateRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsCancelRequest_M
#define DEF_MYSMSAPINS0RemoteSmsCancelRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsCancelRequest

/**
 * The messageId to cancel or zero to cancel all unsent messages
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The messageId to cancel or zero to cancel all unsent messages
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsCancelRequest *_mYSMSAPINS0RemoteSmsCancelRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsCancelRequest = (MYSMSAPINS0RemoteSmsCancelRequest *) [MYSMSAPINS0RemoteSmsCancelRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsCancelRequest;
}

//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 MYSMSAPINS0RemoteSmsCancelRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsCancelRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsCancelRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsCancelRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsCancelRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsCancelRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsCancelRequest *_mYSMSAPINS0RemoteSmsCancelRequest = [[MYSMSAPINS0RemoteSmsCancelRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsCancelRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsCancelRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsCancelRequest autorelease];
  return _mYSMSAPINS0RemoteSmsCancelRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsCancelRequest 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 MYSMSAPINS0RemoteSmsCancelRequest 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 MYSMSAPINS0RemoteSmsCancelRequest from an XML reader. The element to be read is
 * "remoteSmsCancelRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsCancelRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsCancelRequest *_remoteSmsCancelRequest = 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 remoteSmsCancelRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsCancelRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsCancelRequest.");
#endif
    _remoteSmsCancelRequest = (MYSMSAPINS0RemoteSmsCancelRequest *)[MYSMSAPINS0RemoteSmsCancelRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsCancelRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsCancelRequest. Expected element remoteSmsCancelRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsCancelRequest. Expected element remoteSmsCancelRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsCancelRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsCancelRequest to XML under element name "remoteSmsCancelRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsCancelRequest The RemoteSmsCancelRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsCancelRequest 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 "remoteSmsCancelRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsCancelRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsCancelRequest for root element {}remoteSmsCancelRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsCancelRequest for root element {}remoteSmsCancelRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsCancelRequest. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsCancelRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsCancelRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsResendRequest_M
#define DEF_MYSMSAPINS0RemoteSmsResendRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsResendRequest

/**
 * The messageId to resend or zero to resend all unsent messages
 */
- (int) messageId
{
  return _messageId;
}

/**
 * The messageId to resend or zero to resend all unsent messages
 */
- (void) setMessageId: (int) newMessageId
{
  _messageId = newMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsResendRequest *_mYSMSAPINS0RemoteSmsResendRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsResendRequest = (MYSMSAPINS0RemoteSmsResendRequest *) [MYSMSAPINS0RemoteSmsResendRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsResendRequest;
}

//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 MYSMSAPINS0RemoteSmsResendRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsResendRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsResendRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsResendRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsResendRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsResendRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsResendRequest *_mYSMSAPINS0RemoteSmsResendRequest = [[MYSMSAPINS0RemoteSmsResendRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsResendRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsResendRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsResendRequest autorelease];
  return _mYSMSAPINS0RemoteSmsResendRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsResendRequest 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 MYSMSAPINS0RemoteSmsResendRequest 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 MYSMSAPINS0RemoteSmsResendRequest from an XML reader. The element to be read is
 * "remoteSmsResendRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsResendRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsResendRequest *_remoteSmsResendRequest = 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 remoteSmsResendRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsResendRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsResendRequest.");
#endif
    _remoteSmsResendRequest = (MYSMSAPINS0RemoteSmsResendRequest *)[MYSMSAPINS0RemoteSmsResendRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsResendRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsResendRequest. Expected element remoteSmsResendRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsResendRequest. Expected element remoteSmsResendRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsResendRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsResendRequest to XML under element name "remoteSmsResendRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsResendRequest The RemoteSmsResendRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsResendRequest 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 "remoteSmsResendRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsResendRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsResendRequest for root element {}remoteSmsResendRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsResendRequest for root element {}remoteSmsResendRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsResendRequest. 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 "messageId", 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 setMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "messageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}messageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}messageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_messageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}messageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}messageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}messageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsResendRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsResendRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteSmsFailedRequest_M
#define DEF_MYSMSAPINS0RemoteSmsFailedRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteSmsFailedRequest

/**
 * The remote sms send request id.
 */
- (long long) requestId
{
  return _requestId;
}

/**
 * The remote sms send request id.
 */
- (void) setRequestId: (long long) newRequestId
{
  _requestId = newRequestId;
}

/**
 * The sms connector id that was used. Zero for normal operator sms.
 */
- (int) smsConnectorId
{
  return _smsConnectorId;
}

/**
 * The sms connector id that was used. Zero for normal operator sms.
 */
- (void) setSmsConnectorId: (int) newSmsConnectorId
{
  _smsConnectorId = newSmsConnectorId;
}

/**
 * The error message
 */
- (NSString *) errorMessage
{
  return _errorMessage;
}

/**
 * The error message
 */
- (void) setErrorMessage: (NSString *) newErrorMessage
{
  [newErrorMessage retain];
  [_errorMessage release];
  _errorMessage = newErrorMessage;
}

- (void) dealloc
{
  [self setErrorMessage: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteSmsFailedRequest *_mYSMSAPINS0RemoteSmsFailedRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteSmsFailedRequest = (MYSMSAPINS0RemoteSmsFailedRequest *) [MYSMSAPINS0RemoteSmsFailedRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteSmsFailedRequest;
}

//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 MYSMSAPINS0RemoteSmsFailedRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteSmsFailedRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteSmsFailedRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteSmsFailedRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteSmsFailedRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteSmsFailedRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteSmsFailedRequest *_mYSMSAPINS0RemoteSmsFailedRequest = [[MYSMSAPINS0RemoteSmsFailedRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteSmsFailedRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteSmsFailedRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteSmsFailedRequest autorelease];
  return _mYSMSAPINS0RemoteSmsFailedRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteSmsFailedRequest 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 MYSMSAPINS0RemoteSmsFailedRequest 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 MYSMSAPINS0RemoteSmsFailedRequest from an XML reader. The element to be read is
 * "remoteSmsFailedRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteSmsFailedRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteSmsFailedRequest *_remoteSmsFailedRequest = 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 remoteSmsFailedRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteSmsFailedRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteSmsFailedRequest.");
#endif
    _remoteSmsFailedRequest = (MYSMSAPINS0RemoteSmsFailedRequest *)[MYSMSAPINS0RemoteSmsFailedRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteSmsFailedRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsFailedRequest. Expected element remoteSmsFailedRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteSmsFailedRequest. Expected element remoteSmsFailedRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteSmsFailedRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteSmsFailedRequest to XML under element name "remoteSmsFailedRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteSmsFailedRequest The RemoteSmsFailedRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteSmsFailedRequest 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 "remoteSmsFailedRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteSmsFailedRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteSmsFailedRequest for root element {}remoteSmsFailedRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteSmsFailedRequest for root element {}remoteSmsFailedRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteSmsFailedRequest. 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 "requestId", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    [self setRequestId: *((long long*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "smsConnectorId", 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 setSmsConnectorId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "errorMessage", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}errorMessage of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}errorMessage of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setErrorMessage: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "requestId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}requestId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}requestId...");
#endif
    status = xmlTextWriterWriteLongType(writer, &_requestId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}requestId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}requestId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}requestId."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "smsConnectorId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}smsConnectorId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}smsConnectorId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_smsConnectorId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}smsConnectorId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}smsConnectorId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}smsConnectorId."];
    }
  }
  if ([self errorMessage]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "errorMessage", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}errorMessage."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}errorMessage...");
#endif
    [[self errorMessage] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}errorMessage...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}errorMessage."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteSmsFailedRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteSmsFailedRequest_M */
#ifndef DEF_MYSMSAPINS0RemoteCallControlRequest_M
#define DEF_MYSMSAPINS0RemoteCallControlRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0RemoteCallControlRequest

/**
 * The calldId that should be controlled.<br/>
 * <br/>
 * If the call with this id isn't active no action will be applied.
 */
- (int) callId
{
  return _callId;
}

/**
 * The calldId that should be controlled.<br/>
 * <br/>
 * If the call with this id isn't active no action will be applied.
 */
- (void) setCallId: (int) newCallId
{
  _callId = newCallId;
}

/**
 * The action that should be applied on active call.<br/>
 * <br/>
 * 0 .. hangup<br/>
 * 1 .. accept<br/>
 * 2 .. silence phone<br/>
 * 3 .. speaker on (only in call)<br/>
 * 4 .. speaker off (only in call)<br/>
 */
- (int) action
{
  return _action;
}

/**
 * The action that should be applied on active call.<br/>
 * <br/>
 * 0 .. hangup<br/>
 * 1 .. accept<br/>
 * 2 .. silence phone<br/>
 * 3 .. speaker on (only in call)<br/>
 * 4 .. speaker off (only in call)<br/>
 */
- (void) setAction: (int) newAction
{
  _action = newAction;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0RemoteCallControlRequest *_mYSMSAPINS0RemoteCallControlRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0RemoteCallControlRequest = (MYSMSAPINS0RemoteCallControlRequest *) [MYSMSAPINS0RemoteCallControlRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0RemoteCallControlRequest;
}

//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 MYSMSAPINS0RemoteCallControlRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0RemoteCallControlRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0RemoteCallControlRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0RemoteCallControlRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0RemoteCallControlRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0RemoteCallControlRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0RemoteCallControlRequest *_mYSMSAPINS0RemoteCallControlRequest = [[MYSMSAPINS0RemoteCallControlRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0RemoteCallControlRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0RemoteCallControlRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0RemoteCallControlRequest autorelease];
  return _mYSMSAPINS0RemoteCallControlRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0RemoteCallControlRequest 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 MYSMSAPINS0RemoteCallControlRequest 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 MYSMSAPINS0RemoteCallControlRequest from an XML reader. The element to be read is
 * "remoteCallControlRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0RemoteCallControlRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0RemoteCallControlRequest *_remoteCallControlRequest = 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 remoteCallControlRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "remoteCallControlRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}remoteCallControlRequest.");
#endif
    _remoteCallControlRequest = (MYSMSAPINS0RemoteCallControlRequest *)[MYSMSAPINS0RemoteCallControlRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}remoteCallControlRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallControlRequest. Expected element remoteCallControlRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0RemoteCallControlRequest. Expected element remoteCallControlRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _remoteCallControlRequest;
}

/**
 * Writes this MYSMSAPINS0RemoteCallControlRequest to XML under element name "remoteCallControlRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _remoteCallControlRequest The RemoteCallControlRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0RemoteCallControlRequest 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 "remoteCallControlRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}remoteCallControlRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}remoteCallControlRequest for root element {}remoteCallControlRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}remoteCallControlRequest for root element {}remoteCallControlRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}remoteCallControlRequest. 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 "callId", 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 setCallId: *((int*) _child_accessor)];
    free(_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 setAction: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "callId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}callId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}callId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_callId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}callId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}callId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}callId."];
    }
  }
  if (YES) { //always write the primitive element...
    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, &_action);
#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."];
    }
  }
}
@end /* implementation MYSMSAPINS0RemoteCallControlRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0RemoteCallControlRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountCreateResponse_M
#define DEF_MYSMSAPINS0ExternalAccountCreateResponse_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountCreateResponse

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountCreateResponse *_mYSMSAPINS0ExternalAccountCreateResponse;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountCreateResponse = (MYSMSAPINS0ExternalAccountCreateResponse *) [MYSMSAPINS0ExternalAccountCreateResponse readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountCreateResponse;
}

//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 MYSMSAPINS0ExternalAccountCreateResponse */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountCreateResponse (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountCreateResponse (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountCreateResponse (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountCreateResponse from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountCreateResponse defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountCreateResponse *_mYSMSAPINS0ExternalAccountCreateResponse = [[MYSMSAPINS0ExternalAccountCreateResponse alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountCreateResponse initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountCreateResponse = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountCreateResponse autorelease];
  return _mYSMSAPINS0ExternalAccountCreateResponse;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountCreateResponse 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 MYSMSAPINS0ExternalAccountCreateResponse 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 MYSMSAPINS0ExternalAccountCreateResponse from an XML reader. The element to be read is
 * "externalAccountCreateResponse".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountCreateResponse.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountCreateResponse *_externalAccountCreateResponse = 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 externalAccountCreateResponse."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountCreateResponse", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountCreateResponse.");
#endif
    _externalAccountCreateResponse = (MYSMSAPINS0ExternalAccountCreateResponse *)[MYSMSAPINS0ExternalAccountCreateResponse readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountCreateResponse.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountCreateResponse. Expected element externalAccountCreateResponse. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountCreateResponse. Expected element externalAccountCreateResponse. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountCreateResponse;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountCreateResponse to XML under element name "externalAccountCreateResponse".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountCreateResponse The ExternalAccountCreateResponse to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountCreateResponse 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 "externalAccountCreateResponse", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountCreateResponse. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountCreateResponse for root element {}externalAccountCreateResponse...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountCreateResponse for root element {}externalAccountCreateResponse...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountCreateResponse. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0ExternalAccountCreateResponse (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountCreateResponse_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountGetTokenRequest_M
#define DEF_MYSMSAPINS0ExternalAccountGetTokenRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountGetTokenRequest

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountGetTokenRequest *_mYSMSAPINS0ExternalAccountGetTokenRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountGetTokenRequest = (MYSMSAPINS0ExternalAccountGetTokenRequest *) [MYSMSAPINS0ExternalAccountGetTokenRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountGetTokenRequest;
}

//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 MYSMSAPINS0ExternalAccountGetTokenRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountGetTokenRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountGetTokenRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountGetTokenRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountGetTokenRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountGetTokenRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountGetTokenRequest *_mYSMSAPINS0ExternalAccountGetTokenRequest = [[MYSMSAPINS0ExternalAccountGetTokenRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountGetTokenRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountGetTokenRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountGetTokenRequest autorelease];
  return _mYSMSAPINS0ExternalAccountGetTokenRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountGetTokenRequest 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 MYSMSAPINS0ExternalAccountGetTokenRequest 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 MYSMSAPINS0ExternalAccountGetTokenRequest from an XML reader. The element to be read is
 * "externalAccountGetTokenRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountGetTokenRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountGetTokenRequest *_externalAccountGetTokenRequest = 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 externalAccountGetTokenRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountGetTokenRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountGetTokenRequest.");
#endif
    _externalAccountGetTokenRequest = (MYSMSAPINS0ExternalAccountGetTokenRequest *)[MYSMSAPINS0ExternalAccountGetTokenRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountGetTokenRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountGetTokenRequest. Expected element externalAccountGetTokenRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountGetTokenRequest. Expected element externalAccountGetTokenRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountGetTokenRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountGetTokenRequest to XML under element name "externalAccountGetTokenRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountGetTokenRequest The ExternalAccountGetTokenRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountGetTokenRequest 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 "externalAccountGetTokenRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountGetTokenRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountGetTokenRequest for root element {}externalAccountGetTokenRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountGetTokenRequest for root element {}externalAccountGetTokenRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountGetTokenRequest. 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 setType: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountGetTokenRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountGetTokenRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountDeleteRequest_M
#define DEF_MYSMSAPINS0ExternalAccountDeleteRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountDeleteRequest

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * 
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountDeleteRequest *_mYSMSAPINS0ExternalAccountDeleteRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountDeleteRequest = (MYSMSAPINS0ExternalAccountDeleteRequest *) [MYSMSAPINS0ExternalAccountDeleteRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountDeleteRequest;
}

//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 MYSMSAPINS0ExternalAccountDeleteRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountDeleteRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountDeleteRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountDeleteRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountDeleteRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountDeleteRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountDeleteRequest *_mYSMSAPINS0ExternalAccountDeleteRequest = [[MYSMSAPINS0ExternalAccountDeleteRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountDeleteRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountDeleteRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountDeleteRequest autorelease];
  return _mYSMSAPINS0ExternalAccountDeleteRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountDeleteRequest 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 MYSMSAPINS0ExternalAccountDeleteRequest 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 MYSMSAPINS0ExternalAccountDeleteRequest from an XML reader. The element to be read is
 * "externalAccountDeleteRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountDeleteRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountDeleteRequest *_externalAccountDeleteRequest = 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 externalAccountDeleteRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountDeleteRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountDeleteRequest.");
#endif
    _externalAccountDeleteRequest = (MYSMSAPINS0ExternalAccountDeleteRequest *)[MYSMSAPINS0ExternalAccountDeleteRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountDeleteRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountDeleteRequest. Expected element externalAccountDeleteRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountDeleteRequest. Expected element externalAccountDeleteRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountDeleteRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountDeleteRequest to XML under element name "externalAccountDeleteRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountDeleteRequest The ExternalAccountDeleteRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountDeleteRequest 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 "externalAccountDeleteRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountDeleteRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountDeleteRequest for root element {}externalAccountDeleteRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountDeleteRequest for root element {}externalAccountDeleteRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountDeleteRequest. 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 setType: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountDeleteRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountDeleteRequest_M */
#ifndef DEF_MYSMSAPINS0ExternalAccountConnectRequest_M
#define DEF_MYSMSAPINS0ExternalAccountConnectRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ExternalAccountConnectRequest

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (int) type
{
  return _type;
}

/**
 * The type of the account
 * <p/>
 * 0 .. google
 * 2 .. b & you
 * 3 .. at & t
 */
- (void) setType: (int) newType
{
  _type = newType;
}

/**
 * The oauth token of the external account
 */
- (NSString *) oauthToken
{
  return _oauthToken;
}

/**
 * The oauth token of the external account
 */
- (void) setOauthToken: (NSString *) newOauthToken
{
  [newOauthToken retain];
  [_oauthToken release];
  _oauthToken = newOauthToken;
}

/**
 * The optional refresh token of the external account
 */
- (NSString *) refreshToken
{
  return _refreshToken;
}

/**
 * The optional refresh token of the external account
 */
- (void) setRefreshToken: (NSString *) newRefreshToken
{
  [newRefreshToken retain];
  [_refreshToken release];
  _refreshToken = newRefreshToken;
}

- (void) dealloc
{
  [self setOauthToken: nil];
  [self setRefreshToken: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ExternalAccountConnectRequest *_mYSMSAPINS0ExternalAccountConnectRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ExternalAccountConnectRequest = (MYSMSAPINS0ExternalAccountConnectRequest *) [MYSMSAPINS0ExternalAccountConnectRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ExternalAccountConnectRequest;
}

//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 MYSMSAPINS0ExternalAccountConnectRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ExternalAccountConnectRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ExternalAccountConnectRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ExternalAccountConnectRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ExternalAccountConnectRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ExternalAccountConnectRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ExternalAccountConnectRequest *_mYSMSAPINS0ExternalAccountConnectRequest = [[MYSMSAPINS0ExternalAccountConnectRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ExternalAccountConnectRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ExternalAccountConnectRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ExternalAccountConnectRequest autorelease];
  return _mYSMSAPINS0ExternalAccountConnectRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ExternalAccountConnectRequest 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 MYSMSAPINS0ExternalAccountConnectRequest 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 MYSMSAPINS0ExternalAccountConnectRequest from an XML reader. The element to be read is
 * "externalAccountConnectRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ExternalAccountConnectRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ExternalAccountConnectRequest *_externalAccountConnectRequest = 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 externalAccountConnectRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "externalAccountConnectRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}externalAccountConnectRequest.");
#endif
    _externalAccountConnectRequest = (MYSMSAPINS0ExternalAccountConnectRequest *)[MYSMSAPINS0ExternalAccountConnectRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}externalAccountConnectRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountConnectRequest. Expected element externalAccountConnectRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ExternalAccountConnectRequest. Expected element externalAccountConnectRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _externalAccountConnectRequest;
}

/**
 * Writes this MYSMSAPINS0ExternalAccountConnectRequest to XML under element name "externalAccountConnectRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _externalAccountConnectRequest The ExternalAccountConnectRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ExternalAccountConnectRequest 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 "externalAccountConnectRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}externalAccountConnectRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}externalAccountConnectRequest for root element {}externalAccountConnectRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}externalAccountConnectRequest for root element {}externalAccountConnectRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}externalAccountConnectRequest. 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 setType: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "oauthToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}oauthToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setOauthToken: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "refreshToken", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}refreshToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}refreshToken of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setRefreshToken: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    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, &_type);
#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 oauthToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oauthToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}oauthToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}oauthToken...");
#endif
    [[self oauthToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}oauthToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}oauthToken."];
    }
  }
  if ([self refreshToken]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "refreshToken", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}refreshToken."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}refreshToken...");
#endif
    [[self refreshToken] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}refreshToken...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}refreshToken."];
    }
  }
}
@end /* implementation MYSMSAPINS0ExternalAccountConnectRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ExternalAccountConnectRequest_M */
#ifndef DEF_MYSMSAPINS0CrmMessageViewedRequest_M
#define DEF_MYSMSAPINS0CrmMessageViewedRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0CrmMessageViewedRequest

/**
 * The crm message id of the crm message which should be marked as viewed.
 */
- (int) crmMessageId
{
  return _crmMessageId;
}

/**
 * The crm message id of the crm message which should be marked as viewed.
 */
- (void) setCrmMessageId: (int) newCrmMessageId
{
  _crmMessageId = newCrmMessageId;
}

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0CrmMessageViewedRequest *_mYSMSAPINS0CrmMessageViewedRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0CrmMessageViewedRequest = (MYSMSAPINS0CrmMessageViewedRequest *) [MYSMSAPINS0CrmMessageViewedRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0CrmMessageViewedRequest;
}

//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 MYSMSAPINS0CrmMessageViewedRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0CrmMessageViewedRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0CrmMessageViewedRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0CrmMessageViewedRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0CrmMessageViewedRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0CrmMessageViewedRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0CrmMessageViewedRequest *_mYSMSAPINS0CrmMessageViewedRequest = [[MYSMSAPINS0CrmMessageViewedRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0CrmMessageViewedRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0CrmMessageViewedRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0CrmMessageViewedRequest autorelease];
  return _mYSMSAPINS0CrmMessageViewedRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0CrmMessageViewedRequest 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 MYSMSAPINS0CrmMessageViewedRequest 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 MYSMSAPINS0CrmMessageViewedRequest from an XML reader. The element to be read is
 * "crmMessageViewedRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0CrmMessageViewedRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0CrmMessageViewedRequest *_crmMessageViewedRequest = 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 crmMessageViewedRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "crmMessageViewedRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}crmMessageViewedRequest.");
#endif
    _crmMessageViewedRequest = (MYSMSAPINS0CrmMessageViewedRequest *)[MYSMSAPINS0CrmMessageViewedRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}crmMessageViewedRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0CrmMessageViewedRequest. Expected element crmMessageViewedRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0CrmMessageViewedRequest. Expected element crmMessageViewedRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _crmMessageViewedRequest;
}

/**
 * Writes this MYSMSAPINS0CrmMessageViewedRequest to XML under element name "crmMessageViewedRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _crmMessageViewedRequest The CrmMessageViewedRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0CrmMessageViewedRequest 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 "crmMessageViewedRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}crmMessageViewedRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}crmMessageViewedRequest for root element {}crmMessageViewedRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}crmMessageViewedRequest for root element {}crmMessageViewedRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}crmMessageViewedRequest. 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 "crmMessageId", 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 setCrmMessageId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "crmMessageId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}crmMessageId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}crmMessageId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_crmMessageId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}crmMessageId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}crmMessageId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}crmMessageId."];
    }
  }
}
@end /* implementation MYSMSAPINS0CrmMessageViewedRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0CrmMessageViewedRequest_M */
#ifndef DEF_MYSMSAPINS0ConfigGetProductsRequest_M
#define DEF_MYSMSAPINS0ConfigGetProductsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0ConfigGetProductsRequest

/**
 * 
 */
- (NSString *) productType
{
  return _productType;
}

/**
 * 
 */
- (void) setProductType: (NSString *) newProductType
{
  [newProductType retain];
  [_productType release];
  _productType = newProductType;
}

/**
 * If set the list will contain the products of all countries otherwise
 * the list will only include the products of the authenticated user.
 */
- (BOOL) full
{
  return _full;
}

/**
 * If set the list will contain the products of all countries otherwise
 * the list will only include the products of the authenticated user.
 */
- (void) setFull: (BOOL) newFull
{
  _full = newFull;
}

- (void) dealloc
{
  [self setProductType: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0ConfigGetProductsRequest *_mYSMSAPINS0ConfigGetProductsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0ConfigGetProductsRequest = (MYSMSAPINS0ConfigGetProductsRequest *) [MYSMSAPINS0ConfigGetProductsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0ConfigGetProductsRequest;
}

//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 MYSMSAPINS0ConfigGetProductsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0ConfigGetProductsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0ConfigGetProductsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0ConfigGetProductsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0ConfigGetProductsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0ConfigGetProductsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0ConfigGetProductsRequest *_mYSMSAPINS0ConfigGetProductsRequest = [[MYSMSAPINS0ConfigGetProductsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0ConfigGetProductsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0ConfigGetProductsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0ConfigGetProductsRequest autorelease];
  return _mYSMSAPINS0ConfigGetProductsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0ConfigGetProductsRequest 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 MYSMSAPINS0ConfigGetProductsRequest 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 MYSMSAPINS0ConfigGetProductsRequest from an XML reader. The element to be read is
 * "configGetProductsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0ConfigGetProductsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0ConfigGetProductsRequest *_configGetProductsRequest = 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 configGetProductsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "configGetProductsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}configGetProductsRequest.");
#endif
    _configGetProductsRequest = (MYSMSAPINS0ConfigGetProductsRequest *)[MYSMSAPINS0ConfigGetProductsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}configGetProductsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ConfigGetProductsRequest. Expected element configGetProductsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0ConfigGetProductsRequest. Expected element configGetProductsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _configGetProductsRequest;
}

/**
 * Writes this MYSMSAPINS0ConfigGetProductsRequest to XML under element name "configGetProductsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _configGetProductsRequest The ConfigGetProductsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0ConfigGetProductsRequest 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 "configGetProductsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}configGetProductsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}configGetProductsRequest for root element {}configGetProductsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}configGetProductsRequest for root element {}configGetProductsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}configGetProductsRequest. 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 "productType", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}productType of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}productType of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setProductType: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "full", 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 setFull: *((BOOL*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self productType]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "productType", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}productType."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}productType...");
#endif
    [[self productType] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}productType...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}productType."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "full", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}full."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}full...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_full);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}full...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}full."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}full."];
    }
  }
}
@end /* implementation MYSMSAPINS0ConfigGetProductsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0ConfigGetProductsRequest_M */
#ifndef DEF_MYSMSAPINS0AttachmentUploadedPartRequest_M
#define DEF_MYSMSAPINS0AttachmentUploadedPartRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentUploadedPartRequest

/**
 * The newly created attachment key
 */
- (NSString *) attachmentKey
{
  return _attachmentKey;
}

/**
 * The newly created attachment key
 */
- (void) setAttachmentKey: (NSString *) newAttachmentKey
{
  [newAttachmentKey retain];
  [_attachmentKey release];
  _attachmentKey = newAttachmentKey;
}

/**
 * The part id of the attachment
 */
- (int) partId
{
  return _partId;
}

/**
 * The part id of the attachment
 */
- (void) setPartId: (int) newPartId
{
  _partId = newPartId;
}

- (void) dealloc
{
  [self setAttachmentKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentUploadedPartRequest *_mYSMSAPINS0AttachmentUploadedPartRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentUploadedPartRequest = (MYSMSAPINS0AttachmentUploadedPartRequest *) [MYSMSAPINS0AttachmentUploadedPartRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentUploadedPartRequest;
}

//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 MYSMSAPINS0AttachmentUploadedPartRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentUploadedPartRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentUploadedPartRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentUploadedPartRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentUploadedPartRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentUploadedPartRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentUploadedPartRequest *_mYSMSAPINS0AttachmentUploadedPartRequest = [[MYSMSAPINS0AttachmentUploadedPartRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentUploadedPartRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentUploadedPartRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentUploadedPartRequest autorelease];
  return _mYSMSAPINS0AttachmentUploadedPartRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentUploadedPartRequest 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 MYSMSAPINS0AttachmentUploadedPartRequest 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 MYSMSAPINS0AttachmentUploadedPartRequest from an XML reader. The element to be read is
 * "attachmentUploadedPartRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentUploadedPartRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentUploadedPartRequest *_attachmentUploadedPartRequest = 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 attachmentUploadedPartRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentUploadedPartRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentUploadedPartRequest.");
#endif
    _attachmentUploadedPartRequest = (MYSMSAPINS0AttachmentUploadedPartRequest *)[MYSMSAPINS0AttachmentUploadedPartRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentUploadedPartRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentUploadedPartRequest. Expected element attachmentUploadedPartRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentUploadedPartRequest. Expected element attachmentUploadedPartRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentUploadedPartRequest;
}

/**
 * Writes this MYSMSAPINS0AttachmentUploadedPartRequest to XML under element name "attachmentUploadedPartRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentUploadedPartRequest The AttachmentUploadedPartRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentUploadedPartRequest 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 "attachmentUploadedPartRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentUploadedPartRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentUploadedPartRequest for root element {}attachmentUploadedPartRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentUploadedPartRequest for root element {}attachmentUploadedPartRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentUploadedPartRequest. 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 "attachmentKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAttachmentKey: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "partId", 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 setPartId: *((int*) _child_accessor)];
    free(_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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self attachmentKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "attachmentKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}attachmentKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}attachmentKey...");
#endif
    [[self attachmentKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}attachmentKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}attachmentKey."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "partId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}partId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}partId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_partId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}partId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}partId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}partId."];
    }
  }
}
@end /* implementation MYSMSAPINS0AttachmentUploadedPartRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentUploadedPartRequest_M */
#ifndef DEF_MYSMSAPINS0AttachmentGetPartsRequest_M
#define DEF_MYSMSAPINS0AttachmentGetPartsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentGetPartsRequest

/**
 * The attachment key of the attachment which should be retrieved.
 * 
 * The attachment key is the last path element of the attachment url
 */
- (NSString *) attachmentKey
{
  return _attachmentKey;
}

/**
 * The attachment key of the attachment which should be retrieved.
 * 
 * The attachment key is the last path element of the attachment url
 */
- (void) setAttachmentKey: (NSString *) newAttachmentKey
{
  [newAttachmentKey retain];
  [_attachmentKey release];
  _attachmentKey = newAttachmentKey;
}

- (void) dealloc
{
  [self setAttachmentKey: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentGetPartsRequest *_mYSMSAPINS0AttachmentGetPartsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentGetPartsRequest = (MYSMSAPINS0AttachmentGetPartsRequest *) [MYSMSAPINS0AttachmentGetPartsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentGetPartsRequest;
}

//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 MYSMSAPINS0AttachmentGetPartsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentGetPartsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentGetPartsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentGetPartsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentGetPartsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentGetPartsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentGetPartsRequest *_mYSMSAPINS0AttachmentGetPartsRequest = [[MYSMSAPINS0AttachmentGetPartsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentGetPartsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentGetPartsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentGetPartsRequest autorelease];
  return _mYSMSAPINS0AttachmentGetPartsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentGetPartsRequest 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 MYSMSAPINS0AttachmentGetPartsRequest 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 MYSMSAPINS0AttachmentGetPartsRequest from an XML reader. The element to be read is
 * "attachmentGetPartsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentGetPartsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentGetPartsRequest *_attachmentGetPartsRequest = 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 attachmentGetPartsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentGetPartsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentGetPartsRequest.");
#endif
    _attachmentGetPartsRequest = (MYSMSAPINS0AttachmentGetPartsRequest *)[MYSMSAPINS0AttachmentGetPartsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentGetPartsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentGetPartsRequest. Expected element attachmentGetPartsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentGetPartsRequest. Expected element attachmentGetPartsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentGetPartsRequest;
}

/**
 * Writes this MYSMSAPINS0AttachmentGetPartsRequest to XML under element name "attachmentGetPartsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentGetPartsRequest The AttachmentGetPartsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentGetPartsRequest 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 "attachmentGetPartsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentGetPartsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentGetPartsRequest for root element {}attachmentGetPartsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentGetPartsRequest for root element {}attachmentGetPartsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentGetPartsRequest. 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 "attachmentKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAttachmentKey: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self attachmentKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "attachmentKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}attachmentKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}attachmentKey...");
#endif
    [[self attachmentKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}attachmentKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}attachmentKey."];
    }
  }
}
@end /* implementation MYSMSAPINS0AttachmentGetPartsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentGetPartsRequest_M */
#ifndef DEF_MYSMSAPINS0AttachmentCreateRequest_M
#define DEF_MYSMSAPINS0AttachmentCreateRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentCreateRequest

- (void) dealloc
{
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentCreateRequest *_mYSMSAPINS0AttachmentCreateRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentCreateRequest = (MYSMSAPINS0AttachmentCreateRequest *) [MYSMSAPINS0AttachmentCreateRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentCreateRequest;
}

//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 MYSMSAPINS0AttachmentCreateRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentCreateRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentCreateRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentCreateRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentCreateRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentCreateRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentCreateRequest *_mYSMSAPINS0AttachmentCreateRequest = [[MYSMSAPINS0AttachmentCreateRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentCreateRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentCreateRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentCreateRequest autorelease];
  return _mYSMSAPINS0AttachmentCreateRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentCreateRequest 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 MYSMSAPINS0AttachmentCreateRequest 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 MYSMSAPINS0AttachmentCreateRequest from an XML reader. The element to be read is
 * "attachmentCreateRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentCreateRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentCreateRequest *_attachmentCreateRequest = 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 attachmentCreateRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentCreateRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentCreateRequest.");
#endif
    _attachmentCreateRequest = (MYSMSAPINS0AttachmentCreateRequest *)[MYSMSAPINS0AttachmentCreateRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentCreateRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentCreateRequest. Expected element attachmentCreateRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentCreateRequest. Expected element attachmentCreateRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentCreateRequest;
}

/**
 * Writes this MYSMSAPINS0AttachmentCreateRequest to XML under element name "attachmentCreateRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentCreateRequest The AttachmentCreateRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentCreateRequest 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 "attachmentCreateRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentCreateRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentCreateRequest for root element {}attachmentCreateRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentCreateRequest for root element {}attachmentCreateRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentCreateRequest. 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;
  }

  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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

}
@end /* implementation MYSMSAPINS0AttachmentCreateRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentCreateRequest_M */
#ifndef DEF_MYSMSAPINS0AttachmentAllowMsisdnsRequest_M
#define DEF_MYSMSAPINS0AttachmentAllowMsisdnsRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentAllowMsisdnsRequest

/**
 * The attachment key of the attachment
 */
- (NSString *) attachmentKey
{
  return _attachmentKey;
}

/**
 * The attachment key of the attachment
 */
- (void) setAttachmentKey: (NSString *) newAttachmentKey
{
  [newAttachmentKey retain];
  [_attachmentKey release];
  _attachmentKey = newAttachmentKey;
}

/**
 * The msisdns in international format (436761234567)
 */
- (NSArray *) msisdns
{
  return _msisdns;
}

/**
 * The msisdns in international format (436761234567)
 */
- (void) setMsisdns: (NSArray *) newMsisdns
{
  [newMsisdns retain];
  [_msisdns release];
  _msisdns = newMsisdns;
}

- (void) dealloc
{
  [self setAttachmentKey: nil];
  [self setMsisdns: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentAllowMsisdnsRequest *_mYSMSAPINS0AttachmentAllowMsisdnsRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentAllowMsisdnsRequest = (MYSMSAPINS0AttachmentAllowMsisdnsRequest *) [MYSMSAPINS0AttachmentAllowMsisdnsRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentAllowMsisdnsRequest;
}

//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 MYSMSAPINS0AttachmentAllowMsisdnsRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentAllowMsisdnsRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentAllowMsisdnsRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentAllowMsisdnsRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentAllowMsisdnsRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentAllowMsisdnsRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentAllowMsisdnsRequest *_mYSMSAPINS0AttachmentAllowMsisdnsRequest = [[MYSMSAPINS0AttachmentAllowMsisdnsRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentAllowMsisdnsRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentAllowMsisdnsRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentAllowMsisdnsRequest autorelease];
  return _mYSMSAPINS0AttachmentAllowMsisdnsRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentAllowMsisdnsRequest 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 MYSMSAPINS0AttachmentAllowMsisdnsRequest 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 MYSMSAPINS0AttachmentAllowMsisdnsRequest from an XML reader. The element to be read is
 * "attachmentAllowMsisdnsRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentAllowMsisdnsRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentAllowMsisdnsRequest *_attachmentAllowMsisdnsRequest = 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 attachmentAllowMsisdnsRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentAllowMsisdnsRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentAllowMsisdnsRequest.");
#endif
    _attachmentAllowMsisdnsRequest = (MYSMSAPINS0AttachmentAllowMsisdnsRequest *)[MYSMSAPINS0AttachmentAllowMsisdnsRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentAllowMsisdnsRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAllowMsisdnsRequest. Expected element attachmentAllowMsisdnsRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAllowMsisdnsRequest. Expected element attachmentAllowMsisdnsRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentAllowMsisdnsRequest;
}

/**
 * Writes this MYSMSAPINS0AttachmentAllowMsisdnsRequest to XML under element name "attachmentAllowMsisdnsRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentAllowMsisdnsRequest The AttachmentAllowMsisdnsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentAllowMsisdnsRequest 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 "attachmentAllowMsisdnsRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentAllowMsisdnsRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentAllowMsisdnsRequest for root element {}attachmentAllowMsisdnsRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentAllowMsisdnsRequest for root element {}attachmentAllowMsisdnsRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentAllowMsisdnsRequest. 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 "attachmentKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAttachmentKey: __child];
    return YES;
  } //end "if choice"

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "msisdns", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    _child_accessor = xmlTextReaderReadLongType(reader);
    if (_child_accessor == NULL) {
      //panic: unable to return the value for some reason.
      [NSException raise: @"XMLReadError"
                   format: @"Error reading element value."];
    }
    __child = [NSValue value: _child_accessor withObjCType: @encode(long long)];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}msisdns of type {http://www.w3.org/2001/XMLSchema}long.");
#endif

    if ([self msisdns]) {
      [self setMsisdns: [[self msisdns] arrayByAddingObject: __child]];
    }
    else {
      [self setMsisdns: [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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self attachmentKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "attachmentKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}attachmentKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}attachmentKey...");
#endif
    [[self attachmentKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}attachmentKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}attachmentKey."];
    }
  }
  if ([self msisdns]) {
    __enumerator = [[self msisdns] objectEnumerator];

    while ( (__item = [__enumerator nextObject]) ) {
      status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "msisdns", NULL);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing start child element {}msisdns."];
      }

#if DEBUG_ENUNCIATE > 1
      NSLog(@"writing element {}msisdns...");
#endif
      status = xmlTextWriterWriteLongType(writer, ((long long*) [((NSValue *)__item) pointerValue]));
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing child element {}msisdns."];
      }
#if DEBUG_ENUNCIATE > 1
      NSLog(@"successfully wrote element {}msisdns...");
#endif

      status = xmlTextWriterEndElement(writer);
      if (status < 0) {
        [NSException raise: @"XMLWriteError"
                     format: @"Error writing end child element {}msisdns."];
      }
    } //end item iterator.
  }
}
@end /* implementation MYSMSAPINS0AttachmentAllowMsisdnsRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentAllowMsisdnsRequest_M */
#ifndef DEF_MYSMSAPINS0AttachmentAddPartRequest_M
#define DEF_MYSMSAPINS0AttachmentAddPartRequest_M

/**
 * (no documentation provided)
 */
@implementation MYSMSAPINS0AttachmentAddPartRequest

/**
 * The newly created attachment key
 */
- (NSString *) attachmentKey
{
  return _attachmentKey;
}

/**
 * The newly created attachment key
 */
- (void) setAttachmentKey: (NSString *) newAttachmentKey
{
  [newAttachmentKey retain];
  [_attachmentKey release];
  _attachmentKey = newAttachmentKey;
}

/**
 * The type id of the attachment
 * 
 * <table>
 * <tr><th>type id</th><th>description</th><th>preview</th></tr>
 * <tr><td>0</td><td>any file</td><td>no</td></tr>
 * <tr><td>1</td><td>image jpeg</td><td>yes</td></tr>
 * <tr><td>2</td><td>image png</td><td>yes</td></tr>
 * <tr><td>3</td><td>image gif</td><td>yes</td></tr>
 * <tr><td>4</td><td>video mp4</td><td>yes</td></tr>
 * <tr><td>5</td><td>audio mp4</td><td>no</td></tr>
 * <tr><td>6</td><td>location</td><td>yes</td></tr>
 * <tr><td>7</td><td>contact</td><td>yes</td></tr>
 * </table>
 */
- (int) typeId
{
  return _typeId;
}

/**
 * The type id of the attachment
 * 
 * <table>
 * <tr><th>type id</th><th>description</th><th>preview</th></tr>
 * <tr><td>0</td><td>any file</td><td>no</td></tr>
 * <tr><td>1</td><td>image jpeg</td><td>yes</td></tr>
 * <tr><td>2</td><td>image png</td><td>yes</td></tr>
 * <tr><td>3</td><td>image gif</td><td>yes</td></tr>
 * <tr><td>4</td><td>video mp4</td><td>yes</td></tr>
 * <tr><td>5</td><td>audio mp4</td><td>no</td></tr>
 * <tr><td>6</td><td>location</td><td>yes</td></tr>
 * <tr><td>7</td><td>contact</td><td>yes</td></tr>
 * </table>
 */
- (void) setTypeId: (int) newTypeId
{
  _typeId = newTypeId;
}

/**
 * The file name of the attachment part
 */
- (NSString *) fileName
{
  return _fileName;
}

/**
 * The file name of the attachment part
 */
- (void) setFileName: (NSString *) newFileName
{
  [newFileName retain];
  [_fileName release];
  _fileName = newFileName;
}

/**
 * The file size of the attachment part
 * 
 * The maximal file size is 20Mb.
 */
- (int) fileSize
{
  return _fileSize;
}

/**
 * The file size of the attachment part
 * 
 * The maximal file size is 20Mb.
 */
- (void) setFileSize: (int) newFileSize
{
  _fileSize = newFileSize;
}

/**
 * True if a preview is available to upload
 */
- (BOOL) preview
{
  return _preview;
}

/**
 * True if a preview is available to upload
 */
- (void) setPreview: (BOOL) newPreview
{
  _preview = newPreview;
}

/**
 * Sets the properties which depends on the type in json format.
 * 
 * location:
 * {
 * lat: 41.40338,
 * lng: 2.5646
 * }
 * 
 * contact:
 * {
 * name: "Ben",
 * surName: "Becker",
 * 
 * }
 * 
 * others: properties are ignored
 */
- (NSString *) properties
{
  return _properties;
}

/**
 * Sets the properties which depends on the type in json format.
 * 
 * location:
 * {
 * lat: 41.40338,
 * lng: 2.5646
 * }
 * 
 * contact:
 * {
 * name: "Ben",
 * surName: "Becker",
 * 
 * }
 * 
 * others: properties are ignored
 */
- (void) setProperties: (NSString *) newProperties
{
  [newProperties retain];
  [_properties release];
  _properties = newProperties;
}

- (void) dealloc
{
  [self setAttachmentKey: nil];
  [self setFileName: nil];
  [self setProperties: nil];
  [super dealloc];
}

//documentation inherited.
+ (id<EnunciateXML>) readFromXML: (NSData *) xml
{
  MYSMSAPINS0AttachmentAddPartRequest *_mYSMSAPINS0AttachmentAddPartRequest;
  xmlTextReaderPtr reader = xmlReaderForMemory([xml bytes], [xml length], NULL, NULL, 0);
  if (reader == NULL) {
    [NSException raise: @"XMLReadError"
                 format: @"Error instantiating an XML reader."];
    return nil;
  }

  _mYSMSAPINS0AttachmentAddPartRequest = (MYSMSAPINS0AttachmentAddPartRequest *) [MYSMSAPINS0AttachmentAddPartRequest readXMLElement: reader];
  xmlFreeTextReader(reader); //free the reader
  return _mYSMSAPINS0AttachmentAddPartRequest;
}

//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 MYSMSAPINS0AttachmentAddPartRequest */

/**
 * Internal, private interface for JAXB reading and writing.
 */
@interface MYSMSAPINS0AttachmentAddPartRequest (JAXB) <JAXBReading, JAXBWriting, JAXBType, JAXBElement>

@end /*interface MYSMSAPINS0AttachmentAddPartRequest (JAXB)*/

/**
 * Internal, private implementation for JAXB reading and writing.
 */
@implementation MYSMSAPINS0AttachmentAddPartRequest (JAXB)

/**
 * Read an instance of MYSMSAPINS0AttachmentAddPartRequest from an XML reader.
 *
 * @param reader The reader.
 * @return An instance of MYSMSAPINS0AttachmentAddPartRequest defined by the XML reader.
 */
+ (id<JAXBType>) readXMLType: (xmlTextReaderPtr) reader
{
  MYSMSAPINS0AttachmentAddPartRequest *_mYSMSAPINS0AttachmentAddPartRequest = [[MYSMSAPINS0AttachmentAddPartRequest alloc] init];
  NS_DURING
  {
    [_mYSMSAPINS0AttachmentAddPartRequest initWithReader: reader];
  }
  NS_HANDLER
  {
    _mYSMSAPINS0AttachmentAddPartRequest = nil;
    [localException raise];
  }
  NS_ENDHANDLER

  [_mYSMSAPINS0AttachmentAddPartRequest autorelease];
  return _mYSMSAPINS0AttachmentAddPartRequest;
}

/**
 * Initialize this instance of MYSMSAPINS0AttachmentAddPartRequest 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 MYSMSAPINS0AttachmentAddPartRequest 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 MYSMSAPINS0AttachmentAddPartRequest from an XML reader. The element to be read is
 * "attachmentAddPartRequest".
 *
 * @param reader The XML reader.
 * @return The MYSMSAPINS0AttachmentAddPartRequest.
 */
+ (id<JAXBElement>) readXMLElement: (xmlTextReaderPtr) reader {
  int status;
  MYSMSAPINS0AttachmentAddPartRequest *_attachmentAddPartRequest = 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 attachmentAddPartRequest."];
    }
  }

  if (xmlStrcmp(BAD_CAST "attachmentAddPartRequest", xmlTextReaderConstLocalName(reader)) == 0
      && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read root element {}attachmentAddPartRequest.");
#endif
    _attachmentAddPartRequest = (MYSMSAPINS0AttachmentAddPartRequest *)[MYSMSAPINS0AttachmentAddPartRequest readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"Successfully read root element {}attachmentAddPartRequest.");
#endif
  }
  else {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAddPartRequest. Expected element attachmentAddPartRequest. Current element: {}%s", xmlTextReaderConstLocalName(reader)];
    }
    else {
      [NSException raise: @"XMLReadError"
                   format: @"Unable to read MYSMSAPINS0AttachmentAddPartRequest. Expected element attachmentAddPartRequest. Current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader)];
    }
  }

  return _attachmentAddPartRequest;
}

/**
 * Writes this MYSMSAPINS0AttachmentAddPartRequest to XML under element name "attachmentAddPartRequest".
 * The namespace declarations for the element will be written.
 *
 * @param writer The XML writer.
 * @param _attachmentAddPartRequest The AttachmentAddPartRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
- (void) writeXMLElement: (xmlTextWriterPtr) writer
{
  [self writeXMLElement: writer writeNamespaces: YES];
}

/**
 * Writes this MYSMSAPINS0AttachmentAddPartRequest 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 "attachmentAddPartRequest", NULL);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing start element {}attachmentAddPartRequest. XML writer status: %i\n", rc];
  }

#if DEBUG_ENUNCIATE > 1
  NSLog(@"writing type {}attachmentAddPartRequest for root element {}attachmentAddPartRequest...");
#endif
  [self writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
  NSLog(@"successfully wrote type {}attachmentAddPartRequest for root element {}attachmentAddPartRequest...");
#endif
  rc = xmlTextWriterEndElement(writer);
  if (rc < 0) {
    [NSException raise: @"XMLWriteError"
                 format: @"Error writing end element {}attachmentAddPartRequest. 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 "attachmentKey", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}attachmentKey of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setAttachmentKey: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "typeId", 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 setTypeId: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "fileName", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}fileName of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}fileName of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setFileName: __child];
    return YES;
  } //end "if choice"


  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "fileSize", 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 setFileSize: *((int*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "preview", 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 setPreview: *((BOOL*) _child_accessor)];
    free(_child_accessor);
    return YES;
  }
  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "properties", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
    NSLog(@"Attempting to read choice {}properties of type {http://www.w3.org/2001/XMLSchema}string.");
#endif
    __child = [NSString readXMLType: reader];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully read choice {}properties of type {http://www.w3.org/2001/XMLSchema}string.");
#endif

    [self setProperties: __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;
  id __item_copy;
  NSEnumerator *__enumerator;

  [super writeJAXBChildElements: writer];

  if ([self attachmentKey]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "attachmentKey", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}attachmentKey."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}attachmentKey...");
#endif
    [[self attachmentKey] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}attachmentKey...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}attachmentKey."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "typeId", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}typeId."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}typeId...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_typeId);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}typeId...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}typeId."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}typeId."];
    }
  }
  if ([self fileName]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fileName", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}fileName."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}fileName...");
#endif
    [[self fileName] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}fileName...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}fileName."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "fileSize", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}fileSize."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}fileSize...");
#endif
    status = xmlTextWriterWriteIntType(writer, &_fileSize);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}fileSize...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}fileSize."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}fileSize."];
    }
  }
  if (YES) { //always write the primitive element...
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "preview", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}preview."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}preview...");
#endif
    status = xmlTextWriterWriteBooleanType(writer, &_preview);
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}preview...");
#endif
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing child element {}preview."];
    }

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}preview."];
    }
  }
  if ([self properties]) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "properties", NULL);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing start child element {}properties."];
    }

#if DEBUG_ENUNCIATE > 1
    NSLog(@"writing element {}properties...");
#endif
    [[self properties] writeXMLType: writer];
#if DEBUG_ENUNCIATE > 1
    NSLog(@"successfully wrote element {}properties...");
#endif

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
      [NSException raise: @"XMLWriteError"
                   format: @"Error writing end child element {}properties."];
    }
  }
}
@end /* implementation MYSMSAPINS0AttachmentAddPartRequest (JAXB) */

#endif /* DEF_MYSMSAPINS0AttachmentAddPartRequest_M */
