GetUPhoneServerPriceRequest.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. /**
  3. * Copyright 2022 UCloud Technology Co., Ltd.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. namespace UCloud\UPhone\Apis;
  18. use UCloud\Core\Request\Request;
  19. class GetUPhoneServerPriceRequest extends Request
  20. {
  21. public function __construct()
  22. {
  23. parent::__construct(["Action" => "GetUPhoneServerPrice"]);
  24. $this->markRequired("CityId");
  25. $this->markRequired("ServerModelName");
  26. }
  27. /**
  28. * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
  29. *
  30. * @return string|null
  31. */
  32. public function getProjectId()
  33. {
  34. return $this->get("ProjectId");
  35. }
  36. /**
  37. * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
  38. *
  39. * @param string $projectId
  40. */
  41. public function setProjectId($projectId)
  42. {
  43. $this->set("ProjectId", $projectId);
  44. }
  45. /**
  46. * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取
  47. *
  48. * @return string|null
  49. */
  50. public function getCityId()
  51. {
  52. return $this->get("CityId");
  53. }
  54. /**
  55. * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取
  56. *
  57. * @param string $cityId
  58. */
  59. public function setCityId($cityId)
  60. {
  61. $this->set("CityId", $cityId);
  62. }
  63. /**
  64. * ServerModelName: 服务器规格名称
  65. *
  66. * @return string|null
  67. */
  68. public function getServerModelName()
  69. {
  70. return $this->get("ServerModelName");
  71. }
  72. /**
  73. * ServerModelName: 服务器规格名称
  74. *
  75. * @param string $serverModelName
  76. */
  77. public function setServerModelName($serverModelName)
  78. {
  79. $this->set("ServerModelName", $serverModelName);
  80. }
  81. /**
  82. * ChargeType: 计费模式。枚举值为:> Year,按年付费;> Month,按月付费;> Dynamic,按小时预付费; 如果不传某个枚举值,默认返回年付、月付的价格组合集。
  83. *
  84. * @return string|null
  85. */
  86. public function getChargeType()
  87. {
  88. return $this->get("ChargeType");
  89. }
  90. /**
  91. * ChargeType: 计费模式。枚举值为:> Year,按年付费;> Month,按月付费;> Dynamic,按小时预付费; 如果不传某个枚举值,默认返回年付、月付的价格组合集。
  92. *
  93. * @param string $chargeType
  94. */
  95. public function setChargeType($chargeType)
  96. {
  97. $this->set("ChargeType", $chargeType);
  98. }
  99. /**
  100. * Quantity: 购买时长。默认: 1。 月付时,此参数传0,代表了购买至月末。
  101. *
  102. * @return integer|null
  103. */
  104. public function getQuantity()
  105. {
  106. return $this->get("Quantity");
  107. }
  108. /**
  109. * Quantity: 购买时长。默认: 1。 月付时,此参数传0,代表了购买至月末。
  110. *
  111. * @param int $quantity
  112. */
  113. public function setQuantity($quantity)
  114. {
  115. $this->set("Quantity", $quantity);
  116. }
  117. /**
  118. * IpDestRegion: 购买独立IP必须此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
  119. *
  120. * @return string|null
  121. */
  122. public function getIpDestRegion()
  123. {
  124. return $this->get("IpDestRegion");
  125. }
  126. /**
  127. * IpDestRegion: 购买独立IP必须此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
  128. *
  129. * @param string $ipDestRegion
  130. */
  131. public function setIpDestRegion($ipDestRegion)
  132. {
  133. $this->set("IpDestRegion", $ipDestRegion);
  134. }
  135. /**
  136. * Bandwidth: 购买独立IP需要此参数。共享带宽总值。
  137. *
  138. * @return integer|null
  139. */
  140. public function getBandwidth()
  141. {
  142. return $this->get("Bandwidth");
  143. }
  144. /**
  145. * Bandwidth: 购买独立IP需要此参数。共享带宽总值。
  146. *
  147. * @param int $bandwidth
  148. */
  149. public function setBandwidth($bandwidth)
  150. {
  151. $this->set("Bandwidth", $bandwidth);
  152. }
  153. /**
  154. * IpCount: 购买独立IP需要此参数。需要的eip数量。
  155. *
  156. * @return integer|null
  157. */
  158. public function getIpCount()
  159. {
  160. return $this->get("IpCount");
  161. }
  162. /**
  163. * IpCount: 购买独立IP需要此参数。需要的eip数量。
  164. *
  165. * @param int $ipCount
  166. */
  167. public function setIpCount($ipCount)
  168. {
  169. $this->set("IpCount", $ipCount);
  170. }
  171. }