AttributeMap.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace Darabonba\GatewaySpi\Models;
  4. use AlibabaCloud\Tea\Model;
  5. class AttributeMap extends Model {
  6. public function validate() {
  7. Model::validateRequired('attributes', $this->attributes, true);
  8. Model::validateRequired('key', $this->key, true);
  9. }
  10. public function toMap() {
  11. $res = [];
  12. if (null !== $this->attributes) {
  13. $res['attributes'] = $this->attributes;
  14. }
  15. if (null !== $this->key) {
  16. $res['key'] = $this->key;
  17. }
  18. return $res;
  19. }
  20. /**
  21. * @param array $map
  22. * @return AttributeMap
  23. */
  24. public static function fromMap($map = []) {
  25. $model = new self();
  26. if(isset($map['attributes'])){
  27. $model->attributes = $map['attributes'];
  28. }
  29. if(isset($map['key'])){
  30. $model->key = $map['key'];
  31. }
  32. return $model;
  33. }
  34. /**
  35. * @var mixed[]
  36. */
  37. public $attributes;
  38. /**
  39. * @var string[]
  40. */
  41. public $key;
  42. }