OpenApiRequest.php 1.7 KB

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