AddSmsSignRequest.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. /**
  37. * @var int
  38. */
  39. public $signType;
  40. protected $_name = [
  41. 'ownerId' => 'OwnerId',
  42. 'remark' => 'Remark',
  43. 'resourceOwnerAccount' => 'ResourceOwnerAccount',
  44. 'resourceOwnerId' => 'ResourceOwnerId',
  45. 'signFileList' => 'SignFileList',
  46. 'signName' => 'SignName',
  47. 'signSource' => 'SignSource',
  48. 'signType' => 'SignType',
  49. ];
  50. public function validate()
  51. {
  52. }
  53. public function toMap()
  54. {
  55. $res = [];
  56. if (null !== $this->ownerId) {
  57. $res['OwnerId'] = $this->ownerId;
  58. }
  59. if (null !== $this->remark) {
  60. $res['Remark'] = $this->remark;
  61. }
  62. if (null !== $this->resourceOwnerAccount) {
  63. $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount;
  64. }
  65. if (null !== $this->resourceOwnerId) {
  66. $res['ResourceOwnerId'] = $this->resourceOwnerId;
  67. }
  68. if (null !== $this->signFileList) {
  69. $res['SignFileList'] = [];
  70. if (null !== $this->signFileList && \is_array($this->signFileList)) {
  71. $n = 0;
  72. foreach ($this->signFileList as $item) {
  73. $res['SignFileList'][$n++] = null !== $item ? $item->toMap() : $item;
  74. }
  75. }
  76. }
  77. if (null !== $this->signName) {
  78. $res['SignName'] = $this->signName;
  79. }
  80. if (null !== $this->signSource) {
  81. $res['SignSource'] = $this->signSource;
  82. }
  83. if (null !== $this->signType) {
  84. $res['SignType'] = $this->signType;
  85. }
  86. return $res;
  87. }
  88. /**
  89. * @param array $map
  90. *
  91. * @return AddSmsSignRequest
  92. */
  93. public static function fromMap($map = [])
  94. {
  95. $model = new self();
  96. if (isset($map['OwnerId'])) {
  97. $model->ownerId = $map['OwnerId'];
  98. }
  99. if (isset($map['Remark'])) {
  100. $model->remark = $map['Remark'];
  101. }
  102. if (isset($map['ResourceOwnerAccount'])) {
  103. $model->resourceOwnerAccount = $map['ResourceOwnerAccount'];
  104. }
  105. if (isset($map['ResourceOwnerId'])) {
  106. $model->resourceOwnerId = $map['ResourceOwnerId'];
  107. }
  108. if (isset($map['SignFileList'])) {
  109. if (!empty($map['SignFileList'])) {
  110. $model->signFileList = [];
  111. $n = 0;
  112. foreach ($map['SignFileList'] as $item) {
  113. $model->signFileList[$n++] = null !== $item ? signFileList::fromMap($item) : $item;
  114. }
  115. }
  116. }
  117. if (isset($map['SignName'])) {
  118. $model->signName = $map['SignName'];
  119. }
  120. if (isset($map['SignSource'])) {
  121. $model->signSource = $map['SignSource'];
  122. }
  123. if (isset($map['SignType'])) {
  124. $model->signType = $map['SignType'];
  125. }
  126. return $model;
  127. }
  128. }