Params.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 Params extends Model
  6. {
  7. public function validate()
  8. {
  9. Model::validateRequired('action', $this->action, true);
  10. Model::validateRequired('version', $this->version, true);
  11. Model::validateRequired('protocol', $this->protocol, true);
  12. Model::validateRequired('pathname', $this->pathname, true);
  13. Model::validateRequired('method', $this->method, true);
  14. Model::validateRequired('authType', $this->authType, true);
  15. Model::validateRequired('bodyType', $this->bodyType, true);
  16. Model::validateRequired('reqBodyType', $this->reqBodyType, true);
  17. }
  18. public function toMap()
  19. {
  20. $res = [];
  21. if (null !== $this->action) {
  22. $res['action'] = $this->action;
  23. }
  24. if (null !== $this->version) {
  25. $res['version'] = $this->version;
  26. }
  27. if (null !== $this->protocol) {
  28. $res['protocol'] = $this->protocol;
  29. }
  30. if (null !== $this->pathname) {
  31. $res['pathname'] = $this->pathname;
  32. }
  33. if (null !== $this->method) {
  34. $res['method'] = $this->method;
  35. }
  36. if (null !== $this->authType) {
  37. $res['authType'] = $this->authType;
  38. }
  39. if (null !== $this->bodyType) {
  40. $res['bodyType'] = $this->bodyType;
  41. }
  42. if (null !== $this->reqBodyType) {
  43. $res['reqBodyType'] = $this->reqBodyType;
  44. }
  45. if (null !== $this->style) {
  46. $res['style'] = $this->style;
  47. }
  48. return $res;
  49. }
  50. /**
  51. * @param array $map
  52. * @return Params
  53. */
  54. public static function fromMap($map = [])
  55. {
  56. $model = new self();
  57. if (isset($map['action'])) {
  58. $model->action = $map['action'];
  59. }
  60. if (isset($map['version'])) {
  61. $model->version = $map['version'];
  62. }
  63. if (isset($map['protocol'])) {
  64. $model->protocol = $map['protocol'];
  65. }
  66. if (isset($map['pathname'])) {
  67. $model->pathname = $map['pathname'];
  68. }
  69. if (isset($map['method'])) {
  70. $model->method = $map['method'];
  71. }
  72. if (isset($map['authType'])) {
  73. $model->authType = $map['authType'];
  74. }
  75. if (isset($map['bodyType'])) {
  76. $model->bodyType = $map['bodyType'];
  77. }
  78. if (isset($map['reqBodyType'])) {
  79. $model->reqBodyType = $map['reqBodyType'];
  80. }
  81. if (isset($map['style'])) {
  82. $model->style = $map['style'];
  83. }
  84. return $model;
  85. }
  86. /**
  87. * @var string
  88. */
  89. public $action;
  90. /**
  91. * @var string
  92. */
  93. public $version;
  94. /**
  95. * @var string
  96. */
  97. public $protocol;
  98. /**
  99. * @var string
  100. */
  101. public $pathname;
  102. /**
  103. * @var string
  104. */
  105. public $method;
  106. /**
  107. * @var string
  108. */
  109. public $authType;
  110. /**
  111. * @var string
  112. */
  113. public $bodyType;
  114. /**
  115. * @var string
  116. */
  117. public $reqBodyType;
  118. public $style;
  119. }