DescribeDeviceInfoResponse.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace AlibabaCloud\SDK\Cloudauth\V20190307\Models;
  4. use AlibabaCloud\Tea\Model;
  5. class DescribeDeviceInfoResponse extends Model
  6. {
  7. /**
  8. * @var string[]
  9. */
  10. public $headers;
  11. /**
  12. * @var int
  13. */
  14. public $statusCode;
  15. /**
  16. * @var DescribeDeviceInfoResponseBody
  17. */
  18. public $body;
  19. protected $_name = [
  20. 'headers' => 'headers',
  21. 'statusCode' => 'statusCode',
  22. 'body' => 'body',
  23. ];
  24. public function validate()
  25. {
  26. Model::validateRequired('headers', $this->headers, true);
  27. Model::validateRequired('statusCode', $this->statusCode, true);
  28. Model::validateRequired('body', $this->body, true);
  29. }
  30. public function toMap()
  31. {
  32. $res = [];
  33. if (null !== $this->headers) {
  34. $res['headers'] = $this->headers;
  35. }
  36. if (null !== $this->statusCode) {
  37. $res['statusCode'] = $this->statusCode;
  38. }
  39. if (null !== $this->body) {
  40. $res['body'] = null !== $this->body ? $this->body->toMap() : null;
  41. }
  42. return $res;
  43. }
  44. /**
  45. * @param array $map
  46. *
  47. * @return DescribeDeviceInfoResponse
  48. */
  49. public static function fromMap($map = [])
  50. {
  51. $model = new self();
  52. if (isset($map['headers'])) {
  53. $model->headers = $map['headers'];
  54. }
  55. if (isset($map['statusCode'])) {
  56. $model->statusCode = $map['statusCode'];
  57. }
  58. if (isset($map['body'])) {
  59. $model->body = DescribeDeviceInfoResponseBody::fromMap($map['body']);
  60. }
  61. return $model;
  62. }
  63. }