AddCasterLayoutRequest.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. namespace live\Request\V20161101;
  3. /**
  4. * @deprecated Please use https://github.com/aliyun/openapi-sdk-php
  5. *
  6. * Request of AddCasterLayout
  7. *
  8. * @method array getBlendLists()
  9. * @method array getAudioLayers()
  10. * @method array getVideoLayers()
  11. * @method string getCasterId()
  12. * @method array getMixLists()
  13. * @method string getOwnerId()
  14. */
  15. class AddCasterLayoutRequest extends \RpcAcsRequest
  16. {
  17. /**
  18. * @var string
  19. */
  20. protected $method = 'POST';
  21. /**
  22. * Class constructor.
  23. */
  24. public function __construct()
  25. {
  26. parent::__construct(
  27. 'live',
  28. '2016-11-01',
  29. 'AddCasterLayout',
  30. 'live'
  31. );
  32. }
  33. /**
  34. * @param array $blendList
  35. *
  36. * @return $this
  37. */
  38. public function setBlendLists(array $blendList)
  39. {
  40. $this->requestParameters['BlendLists'] = $blendList;
  41. foreach ($blendList as $i => $iValue) {
  42. $this->queryParameters['BlendList.' . ($i + 1)] = $iValue;
  43. }
  44. return $this;
  45. }
  46. /**
  47. * @param array $audioLayer
  48. *
  49. * @return $this
  50. */
  51. public function setAudioLayers(array $audioLayer)
  52. {
  53. $this->requestParameters['AudioLayers'] = $audioLayer;
  54. foreach ($audioLayer as $depth1 => $depth1Value) {
  55. $this->queryParameters['AudioLayer.' . ($depth1 + 1) . '.FixedDelayDuration'] = $depth1Value['FixedDelayDuration'];
  56. $this->queryParameters['AudioLayer.' . ($depth1 + 1) . '.VolumeRate'] = $depth1Value['VolumeRate'];
  57. $this->queryParameters['AudioLayer.' . ($depth1 + 1) . '.ValidChannel'] = $depth1Value['ValidChannel'];
  58. }
  59. return $this;
  60. }
  61. /**
  62. * @param array $videoLayer
  63. *
  64. * @return $this
  65. */
  66. public function setVideoLayers(array $videoLayer)
  67. {
  68. $this->requestParameters['VideoLayers'] = $videoLayer;
  69. foreach ($videoLayer as $depth1 => $depth1Value) {
  70. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.FillMode'] = $depth1Value['FillMode'];
  71. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.WidthNormalized'] = $depth1Value['WidthNormalized'];
  72. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.FixedDelayDuration'] = $depth1Value['FixedDelayDuration'];
  73. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.PositionRefer'] = $depth1Value['PositionRefer'];
  74. foreach ($depth1Value['PositionNormalized'] as $i => $iValue) {
  75. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.PositionNormalized.' . ($i + 1)] = $iValue;
  76. }
  77. $this->queryParameters['VideoLayer.' . ($depth1 + 1) . '.HeightNormalized'] = $depth1Value['HeightNormalized'];
  78. }
  79. return $this;
  80. }
  81. /**
  82. * @param string $casterId
  83. *
  84. * @return $this
  85. */
  86. public function setCasterId($casterId)
  87. {
  88. $this->requestParameters['CasterId'] = $casterId;
  89. $this->queryParameters['CasterId'] = $casterId;
  90. return $this;
  91. }
  92. /**
  93. * @param array $mixList
  94. *
  95. * @return $this
  96. */
  97. public function setMixLists(array $mixList)
  98. {
  99. $this->requestParameters['MixLists'] = $mixList;
  100. foreach ($mixList as $i => $iValue) {
  101. $this->queryParameters['MixList.' . ($i + 1)] = $iValue;
  102. }
  103. return $this;
  104. }
  105. /**
  106. * @param string $ownerId
  107. *
  108. * @return $this
  109. */
  110. public function setOwnerId($ownerId)
  111. {
  112. $this->requestParameters['OwnerId'] = $ownerId;
  113. $this->queryParameters['OwnerId'] = $ownerId;
  114. return $this;
  115. }
  116. }