WebsiteConfiguration.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System.Xml.Serialization;
  2. using System.Collections.Generic;
  3. using System;
  4. namespace COSXML.Model.Tag
  5. {
  6. [XmlRoot]
  7. public sealed class WebsiteConfiguration
  8. {
  9. [XmlElement("IndexDocument")]
  10. public IndexDocument indexDocument;
  11. [XmlElement("ErrorDocument")]
  12. public ErrorDocument errorDocument;
  13. [XmlElement("RedirectAllRequestsTo")]
  14. public RedirectAllRequestTo redirectAllRequestTo;
  15. [XmlArray("RoutingRules")]
  16. public List<RoutingRule> routingRules;
  17. public sealed class IndexDocument
  18. {
  19. [XmlElement("Suffix")]
  20. public string suffix;
  21. }
  22. public sealed class ErrorDocument
  23. {
  24. [XmlElement("Key")]
  25. public string key;
  26. }
  27. public sealed class RedirectAllRequestTo
  28. {
  29. [XmlElement("Protocol")]
  30. public string protocol;
  31. }
  32. public sealed class RoutingRule
  33. {
  34. [XmlElement("Condition")]
  35. public Contidion contidion;
  36. [XmlElement("Redirect")]
  37. public Redirect redirect;
  38. }
  39. public sealed class Contidion
  40. {
  41. [XmlIgnore]
  42. public int httpErrorCodeReturnedEquals;
  43. [XmlElement("HttpErrorCodeReturnedEquals")]
  44. public string httpErrorCodeReturnedEqualsStr;
  45. [XmlElement("KeyPrefixEquals")]
  46. public string keyPrefixEquals;
  47. }
  48. public sealed class Redirect
  49. {
  50. [XmlElement("Protocol")]
  51. public string protocol;
  52. [XmlElement("ReplaceKeyWith")]
  53. public string replaceKeyWith;
  54. [XmlElement("ReplaceKeyPrefixWith")]
  55. public string replaceKeyPrefixWith;
  56. }
  57. }
  58. }