WdkRexSoftwareInfoCheckRequest.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using Top.Api.Util;
  4. namespace Top.Api.Request
  5. {
  6. /// <summary>
  7. /// TOP API: wdk.rex.software.info.check
  8. /// </summary>
  9. public class WdkRexSoftwareInfoCheckRequest : BaseTopRequest<Top.Api.Response.WdkRexSoftwareInfoCheckResponse>
  10. {
  11. /// <summary>
  12. /// 自定义参数
  13. /// </summary>
  14. public string Attributes { get; set; }
  15. /// <summary>
  16. /// 设备ID
  17. /// </summary>
  18. public string DeviceId { get; set; }
  19. /// <summary>
  20. /// 设备类型
  21. /// </summary>
  22. public string DeviceType { get; set; }
  23. /// <summary>
  24. /// 当前版本号
  25. /// </summary>
  26. public string OldVersion { get; set; }
  27. /// <summary>
  28. /// 组织架构信息
  29. /// </summary>
  30. public string OrgInfos { get; set; }
  31. /// <summary>
  32. /// 租户ID
  33. /// </summary>
  34. public Nullable<long> TenantId { get; set; }
  35. #region ITopRequest Members
  36. public override string GetApiName()
  37. {
  38. return "wdk.rex.software.info.check";
  39. }
  40. public override IDictionary<string, string> GetParameters()
  41. {
  42. TopDictionary parameters = new TopDictionary();
  43. parameters.Add("attributes", this.Attributes);
  44. parameters.Add("device_id", this.DeviceId);
  45. parameters.Add("device_type", this.DeviceType);
  46. parameters.Add("old_version", this.OldVersion);
  47. parameters.Add("org_infos", this.OrgInfos);
  48. parameters.Add("tenant_id", this.TenantId);
  49. if (this.otherParams != null)
  50. {
  51. parameters.AddAll(this.otherParams);
  52. }
  53. return parameters;
  54. }
  55. public override void Validate()
  56. {
  57. RequestValidator.ValidateRequired("device_id", this.DeviceId);
  58. RequestValidator.ValidateRequired("old_version", this.OldVersion);
  59. RequestValidator.ValidateRequired("tenant_id", this.TenantId);
  60. }
  61. #endregion
  62. }
  63. }