public virtual void WriteTo(XElement xE) { XElement xItem = null; if (Id != null) { xItem = new XElement(XName.Get("id", "https://adwords.google.com/api/adwords/cm/v201609")); xItem.Add(Id.Value.ToString()); xE.Add(xItem); } if (Status != null) { xItem = new XElement(XName.Get("status", "https://adwords.google.com/api/adwords/cm/v201609")); xItem.Add(Status.Value.ToXmlValue()); xE.Add(xItem); } if (ProgressStats != null) { xItem = new XElement(XName.Get("progressStats", "https://adwords.google.com/api/adwords/cm/v201609")); ProgressStats.WriteTo(xItem); xE.Add(xItem); } if (UploadUrl != null) { xItem = new XElement(XName.Get("uploadUrl", "https://adwords.google.com/api/adwords/cm/v201609")); UploadUrl.WriteTo(xItem); xE.Add(xItem); } if (DownloadUrl != null) { xItem = new XElement(XName.Get("downloadUrl", "https://adwords.google.com/api/adwords/cm/v201609")); DownloadUrl.WriteTo(xItem); xE.Add(xItem); } if (ProcessingErrors != null) { foreach (var processingErrorsItem in ProcessingErrors) { xItem = new XElement(XName.Get("processingErrors", "https://adwords.google.com/api/adwords/cm/v201609")); processingErrorsItem.WriteTo(xItem); xE.Add(xItem); } } if (DiskUsageQuotaBalance != null) { xItem = new XElement(XName.Get("diskUsageQuotaBalance", "https://adwords.google.com/api/adwords/cm/v201609")); xItem.Add(DiskUsageQuotaBalance.Value.ToString()); xE.Add(xItem); } }