device.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. package model
  2. // DeviceListResponse Device List Response.
  3. type DeviceListResponse struct {
  4. Status *DeviceResponseStatus `json:"status"`
  5. Data *DeviceListData `json:"data"`
  6. }
  7. // DeviceListDetailResponse Device List Detail Response.
  8. type DeviceListDetailResponse struct {
  9. Status *DeviceResponseStatus `json:"status"`
  10. Data *DeviceListDetailData `json:"data"`
  11. }
  12. // DeviceBootResponse Device Boot Response.
  13. type DeviceBootResponse struct {
  14. Status *DeviceResponseStatus `json:"status"`
  15. Data *DeviceBootData `json:"data"`
  16. }
  17. // DeviceShutDownResponse Device Shut Down Response.
  18. type DeviceShutDownResponse struct {
  19. Status *DeviceResponseStatus `json:"status"`
  20. }
  21. // DeviceBootData Device Boot Data.
  22. type DeviceBootData struct {
  23. WSRUL string `json:"wsurl"`
  24. UploadURL string `json:"uploadURL"`
  25. }
  26. // DeviceListDetailData Device List Detail Data.
  27. type DeviceListDetailData struct {
  28. Devices *Device `json:"device"`
  29. }
  30. // DeviceListData Device List Data.
  31. type DeviceListData struct {
  32. Devices []*Device `json:"devices"`
  33. }
  34. // DeviceResponseStatus Device Response Status.
  35. type DeviceResponseStatus struct {
  36. Code int `json:"code"`
  37. Status string `json:"status"`
  38. }
  39. // Device Device.
  40. type Device struct {
  41. Serial string `json:"serial"`
  42. Name string `json:"name"`
  43. State string `json:"state"`
  44. Mode string `json:"mode"`
  45. Version string `json:"version"`
  46. CPU string `json:"cpu"`
  47. IsSimulator bool `json:"isSimulator"`
  48. }
  49. // DeviceBootRequest Device Boot Request.
  50. type DeviceBootRequest struct {
  51. Serial string `json:"serial"`
  52. }
  53. // MobileDeviceCategoryResponse MobileDeviceCategory Response.
  54. type MobileDeviceCategoryResponse struct {
  55. Name string `json:"name"`
  56. Label string `json:"label"`
  57. Values []interface{} `json:"values"`
  58. }
  59. // MobileMachineResponse MobileMachine Response.
  60. type MobileMachineResponse struct {
  61. *MobileMachine
  62. ImageSrc string `json:"image_src"`
  63. }