ObjectSelectionFormat.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System.Collections.Generic;
  2. using System.Xml.Serialization;
  3. namespace COSXML.Model.Tag
  4. {
  5. public sealed class ObjectSelectionFormat
  6. {
  7. [XmlElement("CompressionType")]
  8. public string compressionType;
  9. [XmlElement("CSV")]
  10. public CSVFormat csvFormat;
  11. [XmlElement("JSON")]
  12. public JSONFormat jsonFormat;
  13. public ObjectSelectionFormat()
  14. {
  15. }
  16. public ObjectSelectionFormat(string compressionType, CSVFormat csv)
  17. {
  18. this.compressionType = compressionType;
  19. this.csvFormat = csv;
  20. this.jsonFormat = null;
  21. }
  22. public ObjectSelectionFormat(string compressionType, JSONFormat json)
  23. {
  24. this.compressionType = compressionType;
  25. this.csvFormat = null;
  26. this.jsonFormat = json;
  27. }
  28. public sealed class CSVFormat
  29. {
  30. [XmlElement]
  31. public string FileHeaderInfo;
  32. [XmlElement]
  33. public string RecordDelimiter;
  34. [XmlElement]
  35. public string FieldDelimiter;
  36. [XmlElement]
  37. public string QuoteCharacter;
  38. [XmlElement]
  39. public string QuoteEscapeCharacter;
  40. [XmlElement]
  41. public string Comments;
  42. [XmlElement]
  43. public bool AllowQuotedRecordDelimiter;
  44. [XmlElement]
  45. public string QuoteFields;
  46. }
  47. public sealed class JSONFormat
  48. {
  49. [XmlElement]
  50. public string Type;
  51. [XmlElement]
  52. public string RecordDelimiter;
  53. }
  54. }
  55. }