SetUPhoneGPSRequest.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. use UCloud\UPhone\Params\SetUPhoneGPSParamUPhoneGPSs;
  20. class SetUPhoneGPSRequest extends Request
  21. {
  22. public function __construct()
  23. {
  24. parent::__construct(["Action" => "SetUPhoneGPS"]);
  25. $this->markRequired("CityId");
  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. * UPhoneGPSs:
  65. *
  66. * @return SetUPhoneGPSParamUPhoneGPSs[]|null
  67. */
  68. public function getUPhoneGPSs()
  69. {
  70. $items = $this->get("UPhoneGPSs");
  71. if ($items == null) {
  72. return [];
  73. }
  74. $result = [];
  75. foreach ($items as $i => $item) {
  76. array_push($result, new SetUPhoneGPSParamUPhoneGPSs($item));
  77. }
  78. return $result;
  79. }
  80. /**
  81. * UPhoneGPSs:
  82. *
  83. * @param SetUPhoneGPSParamUPhoneGPSs[] $uPhoneGPSs
  84. */
  85. public function setUPhoneGPSs(array $uPhoneGPSs)
  86. {
  87. $result = [];
  88. foreach ($uPhoneGPSs as $i => $item) {
  89. array_push($result, $item->getAll());
  90. }
  91. return $result;
  92. }
  93. /**
  94. * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。
  95. *
  96. * @return string|null
  97. */
  98. public function getProductType()
  99. {
  100. return $this->get("ProductType");
  101. }
  102. /**
  103. * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。
  104. *
  105. * @param string $productType
  106. */
  107. public function setProductType($productType)
  108. {
  109. $this->set("ProductType", $productType);
  110. }
  111. }