AddShortUrlRequest.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models;
  4. use AlibabaCloud\Tea\Model;
  5. class AddShortUrlRequest extends Model
  6. {
  7. /**
  8. * @var string
  9. */
  10. public $effectiveDays;
  11. /**
  12. * @var int
  13. */
  14. public $ownerId;
  15. /**
  16. * @var string
  17. */
  18. public $resourceOwnerAccount;
  19. /**
  20. * @var int
  21. */
  22. public $resourceOwnerId;
  23. /**
  24. * @var string
  25. */
  26. public $shortUrlName;
  27. /**
  28. * @var string
  29. */
  30. public $sourceUrl;
  31. protected $_name = [
  32. 'effectiveDays' => 'EffectiveDays',
  33. 'ownerId' => 'OwnerId',
  34. 'resourceOwnerAccount' => 'ResourceOwnerAccount',
  35. 'resourceOwnerId' => 'ResourceOwnerId',
  36. 'shortUrlName' => 'ShortUrlName',
  37. 'sourceUrl' => 'SourceUrl',
  38. ];
  39. public function validate()
  40. {
  41. }
  42. public function toMap()
  43. {
  44. $res = [];
  45. if (null !== $this->effectiveDays) {
  46. $res['EffectiveDays'] = $this->effectiveDays;
  47. }
  48. if (null !== $this->ownerId) {
  49. $res['OwnerId'] = $this->ownerId;
  50. }
  51. if (null !== $this->resourceOwnerAccount) {
  52. $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount;
  53. }
  54. if (null !== $this->resourceOwnerId) {
  55. $res['ResourceOwnerId'] = $this->resourceOwnerId;
  56. }
  57. if (null !== $this->shortUrlName) {
  58. $res['ShortUrlName'] = $this->shortUrlName;
  59. }
  60. if (null !== $this->sourceUrl) {
  61. $res['SourceUrl'] = $this->sourceUrl;
  62. }
  63. return $res;
  64. }
  65. /**
  66. * @param array $map
  67. *
  68. * @return AddShortUrlRequest
  69. */
  70. public static function fromMap($map = [])
  71. {
  72. $model = new self();
  73. if (isset($map['EffectiveDays'])) {
  74. $model->effectiveDays = $map['EffectiveDays'];
  75. }
  76. if (isset($map['OwnerId'])) {
  77. $model->ownerId = $map['OwnerId'];
  78. }
  79. if (isset($map['ResourceOwnerAccount'])) {
  80. $model->resourceOwnerAccount = $map['ResourceOwnerAccount'];
  81. }
  82. if (isset($map['ResourceOwnerId'])) {
  83. $model->resourceOwnerId = $map['ResourceOwnerId'];
  84. }
  85. if (isset($map['ShortUrlName'])) {
  86. $model->shortUrlName = $map['ShortUrlName'];
  87. }
  88. if (isset($map['SourceUrl'])) {
  89. $model->sourceUrl = $map['SourceUrl'];
  90. }
  91. return $model;
  92. }
  93. }