AddSmsSignRequest.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models;
  4. use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignRequest\signFileList;
  5. use AlibabaCloud\Tea\Model;
  6. class AddSmsSignRequest extends Model
  7. {
  8. /**
  9. * @var int
  10. */
  11. public $ownerId;
  12. /**
  13. * @var string
  14. */
  15. public $remark;
  16. /**
  17. * @var string
  18. */
  19. public $resourceOwnerAccount;
  20. /**
  21. * @var int
  22. */
  23. public $resourceOwnerId;
  24. /**
  25. * @var signFileList[]
  26. */
  27. public $signFileList;
  28. /**
  29. * @var string
  30. */
  31. public $signName;
  32. /**
  33. * @var int
  34. */
  35. public $signSource;
  36. protected $_name = [
  37. 'ownerId' => 'OwnerId',
  38. 'remark' => 'Remark',
  39. 'resourceOwnerAccount' => 'ResourceOwnerAccount',
  40. 'resourceOwnerId' => 'ResourceOwnerId',
  41. 'signFileList' => 'SignFileList',
  42. 'signName' => 'SignName',
  43. 'signSource' => 'SignSource',
  44. ];
  45. public function validate()
  46. {
  47. }
  48. public function toMap()
  49. {
  50. $res = [];
  51. if (null !== $this->ownerId) {
  52. $res['OwnerId'] = $this->ownerId;
  53. }
  54. if (null !== $this->remark) {
  55. $res['Remark'] = $this->remark;
  56. }
  57. if (null !== $this->resourceOwnerAccount) {
  58. $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount;
  59. }
  60. if (null !== $this->resourceOwnerId) {
  61. $res['ResourceOwnerId'] = $this->resourceOwnerId;
  62. }
  63. if (null !== $this->signFileList) {
  64. $res['SignFileList'] = [];
  65. if (null !== $this->signFileList && \is_array($this->signFileList)) {
  66. $n = 0;
  67. foreach ($this->signFileList as $item) {
  68. $res['SignFileList'][$n++] = null !== $item ? $item->toMap() : $item;
  69. }
  70. }
  71. }
  72. if (null !== $this->signName) {
  73. $res['SignName'] = $this->signName;
  74. }
  75. if (null !== $this->signSource) {
  76. $res['SignSource'] = $this->signSource;
  77. }
  78. return $res;
  79. }
  80. /**
  81. * @param array $map
  82. *
  83. * @return AddSmsSignRequest
  84. */
  85. public static function fromMap($map = [])
  86. {
  87. $model = new self();
  88. if (isset($map['OwnerId'])) {
  89. $model->ownerId = $map['OwnerId'];
  90. }
  91. if (isset($map['Remark'])) {
  92. $model->remark = $map['Remark'];
  93. }
  94. if (isset($map['ResourceOwnerAccount'])) {
  95. $model->resourceOwnerAccount = $map['ResourceOwnerAccount'];
  96. }
  97. if (isset($map['ResourceOwnerId'])) {
  98. $model->resourceOwnerId = $map['ResourceOwnerId'];
  99. }
  100. if (isset($map['SignFileList'])) {
  101. if (!empty($map['SignFileList'])) {
  102. $model->signFileList = [];
  103. $n = 0;
  104. foreach ($map['SignFileList'] as $item) {
  105. $model->signFileList[$n++] = null !== $item ? signFileList::fromMap($item) : $item;
  106. }
  107. }
  108. }
  109. if (isset($map['SignName'])) {
  110. $model->signName = $map['SignName'];
  111. }
  112. if (isset($map['SignSource'])) {
  113. $model->signSource = $map['SignSource'];
  114. }
  115. return $model;
  116. }
  117. }