From 15c86cca36ad3aaa728142dbaab785f2dc3d4687 Mon Sep 17 00:00:00 2001 From: ucloud-bot <uweb-bot@ucloud.cn> Date: Mon, 20 Jun 2022 02:53:57 +0000 Subject: [PATCH] auto code generation --- src/UHost/Models/AvailableInstanceTypes.php | 20 +- src/UHost/UHostClient.php | 10 +- src/UNet/Apis/BindEIPRequest.php | 20 + src/UNet/Models/UnetEIPAddrSet.php | 4 +- src/UNet/UNetClient.php | 5 +- src/UPhone/Apis/CreateUPhoneAppRequest.php | 20 + .../Apis/CreateUPhoneAppVersionRequest.php | 20 + src/UPhone/Apis/CreateUPhoneImageRequest.php | 24 +- src/UPhone/Apis/CreateUPhoneImageResponse.php | 20 + src/UPhone/Apis/CreateUPhoneRequest.php | 335 ++++++++++ src/UPhone/Apis/CreateUPhoneResponse.php | 44 ++ src/UPhone/Apis/DeleteUPhoneRequest.php | 111 ++++ src/UPhone/Apis/DeleteUPhoneResponse.php | 44 ++ src/UPhone/Apis/DescribeUPhoneAppRequest.php | 20 + .../Apis/DescribeUPhoneAppVersionRequest.php | 20 + .../Apis/DescribeUPhoneCitiesRequest.php | 20 + .../Apis/DescribeUPhoneDetailByAppRequest.php | 20 + .../Apis/DescribeUPhoneImageRequest.php | 20 + .../Apis/DescribeUPhoneIpRegionsRequest.php | 24 +- src/UPhone/Apis/DescribeUPhoneJobRequest.php | 24 +- .../Apis/DescribeUPhoneModelRequest.php | 20 + src/UPhone/Apis/DescribeUPhoneRequest.php | 20 + .../DescribeUPhoneServerModelResponse.php | 33 + src/UPhone/Apis/GetUPhoneAllowanceRequest.php | 70 ++ .../Apis/GetUPhoneAllowanceResponse.php | 57 ++ src/UPhone/Apis/GetUPhonePriceRequest.php | 230 +++++++ src/UPhone/Apis/GetUPhonePriceResponse.php | 57 ++ .../Apis/GetUPhoneRenewPriceRequest.php | 111 ++++ .../Apis/GetUPhoneRenewPriceResponse.php | 57 ++ .../Apis/GetUPhoneScreenCaptureRequest.php | 24 +- .../Apis/InstallUPhoneAppVersionRequest.php | 20 + src/UPhone/Apis/PoweroffUPhoneRequest.php | 20 + src/UPhone/Apis/PoweronUPhoneRequest.php | 20 + src/UPhone/Apis/RebootUPhoneRequest.php | 20 + src/UPhone/Apis/RebootUPhoneResponse.php | 18 + src/UPhone/Apis/RenewUPhoneRequest.php | 611 ++++++++++++++++++ src/UPhone/Apis/RenewUPhoneResponse.php | 26 + src/UPhone/Apis/ResetUPhoneRequest.php | 20 + src/UPhone/Apis/ResetUPhoneResponse.php | 18 + src/UPhone/Apis/RunAsyncCommandRequest.php | 20 + src/UPhone/Apis/RunSyncCommandRequest.php | 20 + src/UPhone/Apis/SetUPhoneCallbackRequest.php | 132 ++++ src/UPhone/Apis/SetUPhoneCallbackResponse.php | 26 + src/UPhone/Apis/SetUPhoneConfigRequest.php | 28 +- src/UPhone/Apis/SetUPhoneGPSRequest.php | 20 + .../Apis/SetUPhoneManagerModeRequest.php | 20 + src/UPhone/Apis/SetUPhoneRootModeRequest.php | 133 ++++ src/UPhone/Apis/SetUPhoneRootModeResponse.php | 44 ++ .../Apis/SetUPhoneSplashScreenRequest.php | 20 + src/UPhone/Apis/SetUPhoneTokenRequest.php | 24 +- .../Apis/UnInstallUPhoneAppVersionRequest.php | 20 + src/UPhone/Apis/UpdateUPhoneImageRequest.php | 20 + src/UPhone/Models/StockInfo.php | 64 ++ src/UPhone/Models/UPhoneAllowance.php | 64 ++ src/UPhone/Models/UPhoneDetailInstance.php | 24 +- src/UPhone/Models/UPhoneInstance.php | 80 +++ src/UPhone/Models/UPhoneModelInstance.php | 40 ++ src/UPhone/Models/UPhonePriceSet.php | 104 +++ src/UPhone/Models/UPhoneServerPriceSet.php | 4 +- src/UPhone/UPhoneClient.php | 376 ++++++++++- src/UVMS/Apis/SendUVMSMessageRequest.php | 42 -- src/UVMS/UVMSClient.php | 2 - .../Apis/AllocateBatchSecondaryIpRequest.php | 214 ++++++ .../Apis/AllocateBatchSecondaryIpResponse.php | 58 ++ .../Apis/CreateNetworkInterfaceRequest.php | 213 ++++++ .../Apis/CreateNetworkInterfaceResponse.php | 45 ++ ...scribeInstanceNetworkInterfaceResponse.php | 8 +- .../Apis/DescribeNetworkInterfaceResponse.php | 2 + src/VPC/Apis/DescribeRouteTableRequest.php | 48 +- src/VPC/Models/InstanceNetworkInterface.php | 344 ++++++++++ src/VPC/Models/IpsInfo.php | 164 +++++ src/VPC/Models/NetworkInterface.php | 36 +- src/VPC/Models/NetworkInterfaceInfo.php | 304 +++++++++ src/VPC/Models/RouteRuleInfo.php | 20 + src/VPC/Models/RouteTableInfo.php | 20 + src/VPC/Models/StatusInfo.php | 64 ++ src/VPC/Models/UNIIpInfo.php | 64 ++ src/VPC/Models/UNIQuotaInfo.php | 64 ++ src/VPC/VPCClient.php | 122 +++- 79 files changed, 5267 insertions(+), 127 deletions(-) create mode 100644 src/UPhone/Apis/CreateUPhoneRequest.php create mode 100644 src/UPhone/Apis/CreateUPhoneResponse.php create mode 100644 src/UPhone/Apis/DeleteUPhoneRequest.php create mode 100644 src/UPhone/Apis/DeleteUPhoneResponse.php create mode 100644 src/UPhone/Apis/GetUPhoneAllowanceRequest.php create mode 100644 src/UPhone/Apis/GetUPhoneAllowanceResponse.php create mode 100644 src/UPhone/Apis/GetUPhonePriceRequest.php create mode 100644 src/UPhone/Apis/GetUPhonePriceResponse.php create mode 100644 src/UPhone/Apis/GetUPhoneRenewPriceRequest.php create mode 100644 src/UPhone/Apis/GetUPhoneRenewPriceResponse.php create mode 100644 src/UPhone/Apis/RenewUPhoneRequest.php create mode 100644 src/UPhone/Apis/RenewUPhoneResponse.php create mode 100644 src/UPhone/Apis/SetUPhoneCallbackRequest.php create mode 100644 src/UPhone/Apis/SetUPhoneCallbackResponse.php create mode 100644 src/UPhone/Apis/SetUPhoneRootModeRequest.php create mode 100644 src/UPhone/Apis/SetUPhoneRootModeResponse.php create mode 100644 src/UPhone/Models/StockInfo.php create mode 100644 src/UPhone/Models/UPhoneAllowance.php create mode 100644 src/UPhone/Models/UPhonePriceSet.php create mode 100644 src/VPC/Apis/AllocateBatchSecondaryIpRequest.php create mode 100644 src/VPC/Apis/AllocateBatchSecondaryIpResponse.php create mode 100644 src/VPC/Apis/CreateNetworkInterfaceRequest.php create mode 100644 src/VPC/Apis/CreateNetworkInterfaceResponse.php create mode 100644 src/VPC/Models/InstanceNetworkInterface.php create mode 100644 src/VPC/Models/IpsInfo.php create mode 100644 src/VPC/Models/NetworkInterfaceInfo.php create mode 100644 src/VPC/Models/StatusInfo.php create mode 100644 src/VPC/Models/UNIIpInfo.php create mode 100644 src/VPC/Models/UNIQuotaInfo.php diff --git a/src/UHost/Models/AvailableInstanceTypes.php b/src/UHost/Models/AvailableInstanceTypes.php index 1199f3ae..df0bd1ab 100644 --- a/src/UHost/Models/AvailableInstanceTypes.php +++ b/src/UHost/Models/AvailableInstanceTypes.php @@ -65,33 +65,21 @@ public function setStatus($status) /** * CpuPlatforms: 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回 * - * @return CpuPlatforms[]|null + * @return CpuPlatforms|null */ public function getCpuPlatforms() { - $items = $this->get("CpuPlatforms"); - if ($items == null) { - return []; - } - $result = []; - foreach ($items as $i => $item) { - array_push($result, new CpuPlatforms($item)); - } - return $result; + return new CpuPlatforms($this->get("CpuPlatforms")); } /** * CpuPlatforms: 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回 * - * @param CpuPlatforms[] $cpuPlatforms + * @param CpuPlatforms $cpuPlatforms */ public function setCpuPlatforms(array $cpuPlatforms) { - $result = []; - foreach ($cpuPlatforms as $i => $item) { - array_push($result, $item->getAll()); - } - return $result; + $this->set("CpuPlatforms", $cpuPlatforms->getAll()); } /** diff --git a/src/UHost/UHostClient.php b/src/UHost/UHostClient.php index b6fad119..97e7ca52 100644 --- a/src/UHost/UHostClient.php +++ b/src/UHost/UHostClient.php @@ -386,12 +386,10 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * [ * "Name" => (string) 机型名称:快杰O型|O 、快杰共享型|OM 、快杰内存型|OMEM 、 快杰PRO型|OPRO、通用N型|N、高主频C型|C和GPU G型|G等 * "Status" => (string) 机型状态:可售|Normal 、 公测|Beta、售罄|Soldout、隐藏|Hidden - * "CpuPlatforms" => (array<object>) 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回[ - * [ - * "Intel" => (array<string>) 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake'] - * "Amd" => (array<string>) 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] - * "Ampere" => (array<string>) 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] - * ] + * "CpuPlatforms" => (object) 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回[ + * "Intel" => (array<string>) 返回Intel的CPU平台信息,例如:Intel: ['Intel/CascadeLake','Intel/CascadelakeR','Intel/IceLake'] + * "Amd" => (array<string>) 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] + * "Ampere" => (array<string>) 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] * ] * "Disks" => (array<object>) 磁盘信息。磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。其中云盘主要包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。MinimalSize为磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。MaximalSize为磁盘最大值。InstantResize表示系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。Features为磁盘可支持的服务:数据方舟|DATAARK,快照服务|SNAPSHOT,加密盘|Encrypted。[ * [ diff --git a/src/UNet/Apis/BindEIPRequest.php b/src/UNet/Apis/BindEIPRequest.php index 25b34013..c613867c 100644 --- a/src/UNet/Apis/BindEIPRequest.php +++ b/src/UNet/Apis/BindEIPRequest.php @@ -130,4 +130,24 @@ public function setResourceId($resourceId) { $this->set("ResourceId", $resourceId); } + + /** + * PrivateIP: EIP与内网IP进行绑定时需要传入UNI下未绑定过EIP的内网IP + * + * @return string|null + */ + public function getPrivateIP() + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: EIP与内网IP进行绑定时需要传入UNI下未绑定过EIP的内网IP + * + * @param string $privateIP + */ + public function setPrivateIP($privateIP) + { + $this->set("PrivateIP", $privateIP); + } } diff --git a/src/UNet/Models/UnetEIPAddrSet.php b/src/UNet/Models/UnetEIPAddrSet.php index a7b2d624..0deacdc5 100644 --- a/src/UNet/Models/UnetEIPAddrSet.php +++ b/src/UNet/Models/UnetEIPAddrSet.php @@ -23,7 +23,7 @@ class UnetEIPAddrSet extends Response /** - * OperatorName: 运营商信息如: 国际: International, BGP: BGP + * OperatorName: 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp * * @return string|null */ @@ -33,7 +33,7 @@ public function getOperatorName() } /** - * OperatorName: 运营商信息如: 国际: International, BGP: BGP + * OperatorName: 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp * * @param string $operatorName */ diff --git a/src/UNet/UNetClient.php b/src/UNet/UNetClient.php index e3d071a9..88e0d8c7 100644 --- a/src/UNet/UNetClient.php +++ b/src/UNet/UNetClient.php @@ -122,7 +122,7 @@ class UNetClient extends Client * "EIPId" => (string) 申请到的EIP资源ID * "EIPAddr" => (array<object>) 申请到的IPv4地址. [ * [ - * "OperatorName" => (string) 运营商信息如: 国际: International, BGP: BGP + * "OperatorName" => (string) 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp * "IP" => (string) IP地址 * ] * ] @@ -213,6 +213,7 @@ public function associateEIPWithShareBandwidth(AssociateEIPWithShareBandwidthReq * "EIPId" => (string) 弹性IP的资源Id * "ResourceType" => (string) 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB * "ResourceId" => (string) 弹性IP请求绑定的资源ID + * "PrivateIP" => (string) EIP与内网IP进行绑定时需要传入UNI下未绑定过EIP的内网IP * ] * * Outputs: @@ -469,7 +470,7 @@ public function describeBandwidthUsage(DescribeBandwidthUsageRequest $request = * ] * "EIPAddr" => (array<object>) 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet[ * [ - * "OperatorName" => (string) 运营商信息如: 国际: International, BGP: BGP + * "OperatorName" => (string) 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp * "IP" => (string) IP地址 * ] * ] diff --git a/src/UPhone/Apis/CreateUPhoneAppRequest.php b/src/UPhone/Apis/CreateUPhoneAppRequest.php index dfcb2769..d8e19da2 100644 --- a/src/UPhone/Apis/CreateUPhoneAppRequest.php +++ b/src/UPhone/Apis/CreateUPhoneAppRequest.php @@ -87,4 +87,24 @@ public function setDescription($description) { $this->set("Description", $description); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/CreateUPhoneAppVersionRequest.php b/src/UPhone/Apis/CreateUPhoneAppVersionRequest.php index 7809e677..8f9fb49e 100644 --- a/src/UPhone/Apis/CreateUPhoneAppVersionRequest.php +++ b/src/UPhone/Apis/CreateUPhoneAppVersionRequest.php @@ -129,4 +129,24 @@ public function setDescription($description) { $this->set("Description", $description); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/CreateUPhoneImageRequest.php b/src/UPhone/Apis/CreateUPhoneImageRequest.php index ebdc7d75..60ede294 100644 --- a/src/UPhone/Apis/CreateUPhoneImageRequest.php +++ b/src/UPhone/Apis/CreateUPhoneImageRequest.php @@ -50,7 +50,7 @@ public function setProjectId($projectId) } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://cms-docs.ucloudadmin.com/api/uphone-api/describe_u_phone_cities)获取 * * @return string|null */ @@ -60,7 +60,7 @@ public function getCityId() } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://cms-docs.ucloudadmin.com/api/uphone-api/describe_u_phone_cities)获取 * * @param string $cityId */ @@ -128,4 +128,24 @@ public function setDescription($description) { $this->set("Description", $description); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/CreateUPhoneImageResponse.php b/src/UPhone/Apis/CreateUPhoneImageResponse.php index e029f501..8550c0a5 100644 --- a/src/UPhone/Apis/CreateUPhoneImageResponse.php +++ b/src/UPhone/Apis/CreateUPhoneImageResponse.php @@ -41,4 +41,24 @@ public function setImageId($imageId) { $this->set("ImageId", $imageId); } + + /** + * JobId: 请求的唯一标识Id,`RetCode`为0时返回,可根据此ID查询请求的执行状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + + /** + * JobId: 请求的唯一标识Id,`RetCode`为0时返回,可根据此ID查询请求的执行状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } } diff --git a/src/UPhone/Apis/CreateUPhoneRequest.php b/src/UPhone/Apis/CreateUPhoneRequest.php new file mode 100644 index 00000000..61369eb2 --- /dev/null +++ b/src/UPhone/Apis/CreateUPhoneRequest.php @@ -0,0 +1,335 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class CreateUPhoneRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "CreateUPhone"]); + $this->markRequired("Name"); + $this->markRequired("UPhoneModelName"); + $this->markRequired("MediaBandwidth"); + $this->markRequired("ImageId"); + $this->markRequired("CityId"); + $this->markRequired("UPhoneCount"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 云手机实例名称,默认:UPhone。如果同时创建多个,则增加数字后缀,如UPhone-1 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 云手机实例名称,默认:UPhone。如果同时创建多个,则增加数字后缀,如UPhone-1 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表]()查询支持的云手机规格。 + * + * @return string|null + */ + public function getUPhoneModelName() + { + return $this->get("UPhoneModelName"); + } + + /** + * UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表]()查询支持的云手机规格。 + * + * @param string $uPhoneModelName + */ + public function setUPhoneModelName($uPhoneModelName) + { + $this->set("UPhoneModelName", $uPhoneModelName); + } + + /** + * MediaBandwidth: 云手机画面带宽,默认2M + * + * @return integer|null + */ + public function getMediaBandwidth() + { + return $this->get("MediaBandwidth"); + } + + /** + * MediaBandwidth: 云手机画面带宽,默认2M + * + * @param int $mediaBandwidth + */ + public function setMediaBandwidth($mediaBandwidth) + { + $this->set("MediaBandwidth", $mediaBandwidth); + } + + /** + * ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像]()查询云手机规格对应的镜像ID。 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像]()查询云手机规格对应的镜像ID。 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneCount: 创建云手机的个数 + * + * @return integer|null + */ + public function getUPhoneCount() + { + return $this->get("UPhoneCount"); + } + + /** + * UPhoneCount: 创建云手机的个数 + * + * @param int $uPhoneCount + */ + public function setUPhoneCount($uPhoneCount) + { + $this->set("UPhoneCount", $uPhoneCount); + } + + /** + * ChargeType: 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认值: 1。月付时,此参数传0,代表购买至月末。 + * + * @return string|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认值: 1。月付时,此参数传0,代表购买至月末。 + * + * @param string $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * IpDestRegion: 购买独立IP必须有此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getIpDestRegion() + { + return $this->get("IpDestRegion"); + } + + /** + * IpDestRegion: 购买独立IP必须有此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $ipDestRegion + */ + public function setIpDestRegion($ipDestRegion) + { + $this->set("IpDestRegion", $ipDestRegion); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * BindIp: 绑定独立IP + * + * @return boolean|null + */ + public function getBindIp() + { + return $this->get("BindIp"); + } + + /** + * BindIp: 绑定独立IP + * + * @param boolean $bindIp + */ + public function setBindIp($bindIp) + { + $this->set("BindIp", $bindIp); + } + + /** + * Bandwidth: 独立IP带宽 + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 独立IP带宽 + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * IpProportion: 独立IP参数。需要独立IP的比例。eg: [4:1]->4, [3:1]->3。 + * + * @return integer|null + */ + public function getIpProportion() + { + return $this->get("IpProportion"); + } + + /** + * IpProportion: 独立IP参数。需要独立IP的比例。eg: [4:1]->4, [3:1]->3。 + * + * @param int $ipProportion + */ + public function setIpProportion($ipProportion) + { + $this->set("IpProportion", $ipProportion); + } + + /** + * CouponId: 云手机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看。注:代金券对带宽不适用,仅适用于云手机计费 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 云手机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看。注:代金券对带宽不适用,仅适用于云手机计费 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UPhone/Apis/CreateUPhoneResponse.php b/src/UPhone/Apis/CreateUPhoneResponse.php new file mode 100644 index 00000000..b79e714f --- /dev/null +++ b/src/UPhone/Apis/CreateUPhoneResponse.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; + +class CreateUPhoneResponse extends Response +{ + + + /** + * JobId: 任务ID,用来查询创建云手机任务状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + + /** + * JobId: 任务ID,用来查询创建云手机任务状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } +} diff --git a/src/UPhone/Apis/DeleteUPhoneRequest.php b/src/UPhone/Apis/DeleteUPhoneRequest.php new file mode 100644 index 00000000..a6ee7525 --- /dev/null +++ b/src/UPhone/Apis/DeleteUPhoneRequest.php @@ -0,0 +1,111 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class DeleteUPhoneRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "DeleteUPhone"]); + $this->markRequired("CityId"); + $this->markRequired("UPhoneIds"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望获取信息的云手机 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId + * + * @return string[]|null + */ + public function getUPhoneIds() + { + return $this->get("UPhoneIds"); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望获取信息的云手机 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId + * + * @param string[] $uPhoneIds + */ + public function setUPhoneIds(array $uPhoneIds) + { + $this->set("UPhoneIds", $uPhoneIds); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UPhone/Apis/DeleteUPhoneResponse.php b/src/UPhone/Apis/DeleteUPhoneResponse.php new file mode 100644 index 00000000..fadcc6a3 --- /dev/null +++ b/src/UPhone/Apis/DeleteUPhoneResponse.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; + +class DeleteUPhoneResponse extends Response +{ + + + /** + * JobId: 任务ID,用来查询删除云手机任务状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + + /** + * JobId: 任务ID,用来查询删除云手机任务状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } +} diff --git a/src/UPhone/Apis/DescribeUPhoneAppRequest.php b/src/UPhone/Apis/DescribeUPhoneAppRequest.php index bbdecc08..368796c7 100644 --- a/src/UPhone/Apis/DescribeUPhoneAppRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneAppRequest.php @@ -106,4 +106,24 @@ public function setLimit($limit) { $this->set("Limit", $limit); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneAppVersionRequest.php b/src/UPhone/Apis/DescribeUPhoneAppVersionRequest.php index 51ed144a..4dabe744 100644 --- a/src/UPhone/Apis/DescribeUPhoneAppVersionRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneAppVersionRequest.php @@ -146,4 +146,24 @@ public function setOffset($offset) { $this->set("Offset", $offset); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneCitiesRequest.php b/src/UPhone/Apis/DescribeUPhoneCitiesRequest.php index 21d289fe..c08744bd 100644 --- a/src/UPhone/Apis/DescribeUPhoneCitiesRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneCitiesRequest.php @@ -46,4 +46,24 @@ public function setProjectId($projectId) { $this->set("ProjectId", $projectId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneDetailByAppRequest.php b/src/UPhone/Apis/DescribeUPhoneDetailByAppRequest.php index 7bd2eaf9..c6ac2441 100644 --- a/src/UPhone/Apis/DescribeUPhoneDetailByAppRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneDetailByAppRequest.php @@ -128,4 +128,24 @@ public function setLimit($limit) { $this->set("Limit", $limit); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneImageRequest.php b/src/UPhone/Apis/DescribeUPhoneImageRequest.php index 503c7d61..aad2c6c0 100644 --- a/src/UPhone/Apis/DescribeUPhoneImageRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneImageRequest.php @@ -126,4 +126,24 @@ public function setLimit($limit) { $this->set("Limit", $limit); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneIpRegionsRequest.php b/src/UPhone/Apis/DescribeUPhoneIpRegionsRequest.php index 1b47dc03..9aaf438d 100644 --- a/src/UPhone/Apis/DescribeUPhoneIpRegionsRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneIpRegionsRequest.php @@ -49,7 +49,7 @@ public function setProjectId($projectId) } /** - * CityId: 城市Id,eg: cn-shanghai, cn-hangzhou + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @return string|null */ @@ -59,7 +59,7 @@ public function getCityId() } /** - * CityId: 城市Id,eg: cn-shanghai, cn-hangzhou + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @param string $cityId */ @@ -67,4 +67,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneJobRequest.php b/src/UPhone/Apis/DescribeUPhoneJobRequest.php index cac5bb18..f6534424 100644 --- a/src/UPhone/Apis/DescribeUPhoneJobRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneJobRequest.php @@ -69,7 +69,7 @@ public function setCityId($cityId) } /** - * JobIds: 【数组】Job 的唯一标识 Id,调用方式举例:ServerIds.0=希望查询状态的 Job1,ServerIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 + * JobIds: 【数组】Job 的唯一标识 Id,调用方式举例:JobIds.0=希望查询状态的 Job1,JobIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 * * @return string[]|null */ @@ -79,7 +79,7 @@ public function getJobIds() } /** - * JobIds: 【数组】Job 的唯一标识 Id,调用方式举例:ServerIds.0=希望查询状态的 Job1,ServerIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 + * JobIds: 【数组】Job 的唯一标识 Id,调用方式举例:JobIds.0=希望查询状态的 Job1,JobIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 * * @param string[] $jobIds */ @@ -167,4 +167,24 @@ public function setTypes(array $types) { $this->set("Types", $types); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneModelRequest.php b/src/UPhone/Apis/DescribeUPhoneModelRequest.php index 519f62ba..735d6b68 100644 --- a/src/UPhone/Apis/DescribeUPhoneModelRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneModelRequest.php @@ -106,4 +106,24 @@ public function setLimit($limit) { $this->set("Limit", $limit); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneRequest.php b/src/UPhone/Apis/DescribeUPhoneRequest.php index 6d8dc060..cffcb109 100644 --- a/src/UPhone/Apis/DescribeUPhoneRequest.php +++ b/src/UPhone/Apis/DescribeUPhoneRequest.php @@ -187,4 +187,24 @@ public function setIsAll($isAll) { $this->set("IsAll", $isAll); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/DescribeUPhoneServerModelResponse.php b/src/UPhone/Apis/DescribeUPhoneServerModelResponse.php index ed3f7b63..6c3028d9 100644 --- a/src/UPhone/Apis/DescribeUPhoneServerModelResponse.php +++ b/src/UPhone/Apis/DescribeUPhoneServerModelResponse.php @@ -17,6 +17,7 @@ namespace UCloud\UPhone\Apis; use UCloud\Core\Response\Response; +use UCloud\UPhone\Models\StockInfo; use UCloud\UPhone\Models\ServerModelInstance; use UCloud\UPhone\Models\ServerDiskSet; use UCloud\UPhone\Models\UPhoneSpec; @@ -45,6 +46,38 @@ public function setTotalCount($totalCount) $this->set("TotalCount", $totalCount); } + /** + * Stock: 服务器model的库存 + * + * @return StockInfo[]|null + */ + public function getStock() + { + $items = $this->get("Stock"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new StockInfo($item)); + } + return $result; + } + + /** + * Stock: 服务器model的库存 + * + * @param StockInfo[] $stock + */ + public function setStock(array $stock) + { + $result = []; + foreach ($stock as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + /** * ServerModels: ServerModel实例列表,每项参数可见数据模型 ServerModelInstance * diff --git a/src/UPhone/Apis/GetUPhoneAllowanceRequest.php b/src/UPhone/Apis/GetUPhoneAllowanceRequest.php new file mode 100644 index 00000000..1a5c21d1 --- /dev/null +++ b/src/UPhone/Apis/GetUPhoneAllowanceRequest.php @@ -0,0 +1,70 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class GetUPhoneAllowanceRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "GetUPhoneAllowance"]); + $this->markRequired("CityId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } +} diff --git a/src/UPhone/Apis/GetUPhoneAllowanceResponse.php b/src/UPhone/Apis/GetUPhoneAllowanceResponse.php new file mode 100644 index 00000000..9d6c13c0 --- /dev/null +++ b/src/UPhone/Apis/GetUPhoneAllowanceResponse.php @@ -0,0 +1,57 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; +use UCloud\UPhone\Models\UPhoneAllowance; + +class GetUPhoneAllowanceResponse extends Response +{ + + + /** + * UPhoneAllowance: 手机型号以及可创建数量 + * + * @return UPhoneAllowance[]|null + */ + public function getUPhoneAllowance() + { + $items = $this->get("UPhoneAllowance"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPhoneAllowance($item)); + } + return $result; + } + + /** + * UPhoneAllowance: 手机型号以及可创建数量 + * + * @param UPhoneAllowance[] $uPhoneAllowance + */ + public function setUPhoneAllowance(array $uPhoneAllowance) + { + $result = []; + foreach ($uPhoneAllowance as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPhone/Apis/GetUPhonePriceRequest.php b/src/UPhone/Apis/GetUPhonePriceRequest.php new file mode 100644 index 00000000..72ca7043 --- /dev/null +++ b/src/UPhone/Apis/GetUPhonePriceRequest.php @@ -0,0 +1,230 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class GetUPhonePriceRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "GetUPhonePrice"]); + $this->markRequired("CityId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneModelName: 云手机规格名称 + * + * @return integer|null + */ + public function getUPhoneModelName() + { + return $this->get("UPhoneModelName"); + } + + /** + * UPhoneModelName: 云手机规格名称 + * + * @param int $uPhoneModelName + */ + public function setUPhoneModelName($uPhoneModelName) + { + $this->set("UPhoneModelName", $uPhoneModelName); + } + + /** + * MediaBandwidth: 云手机画面带宽值,画面带宽和手机强绑定关系,必须和手机数量对应。 + * + * @return integer|null + */ + public function getMediaBandwidth() + { + return $this->get("MediaBandwidth"); + } + + /** + * MediaBandwidth: 云手机画面带宽值,画面带宽和手机强绑定关系,必须和手机数量对应。 + * + * @param int $mediaBandwidth + */ + public function setMediaBandwidth($mediaBandwidth) + { + $this->set("MediaBandwidth", $mediaBandwidth); + } + + /** + * UPhoneCount: 云手机个数 + * + * @return integer|null + */ + public function getUPhoneCount() + { + return $this->get("UPhoneCount"); + } + + /** + * UPhoneCount: 云手机个数 + * + * @param int $uPhoneCount + */ + public function setUPhoneCount($uPhoneCount) + { + $this->set("UPhoneCount", $uPhoneCount); + } + + /** + * ChargeType: 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 如果不传某个枚举值,默认返回年付、月付的价格组合集。 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 如果不传某个枚举值,默认返回年付、月付的价格组合集。 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认: 1。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * IpDestRegion: 购买独立IP必须此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getIpDestRegion() + { + return $this->get("IpDestRegion"); + } + + /** + * IpDestRegion: 购买独立IP必须此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $ipDestRegion + */ + public function setIpDestRegion($ipDestRegion) + { + $this->set("IpDestRegion", $ipDestRegion); + } + + /** + * INetBandwidth: 购买独立IP需要此参数,其中一个ip的带宽值。 + * + * @return integer|null + */ + public function getINetBandwidth() + { + return $this->get("INetBandwidth"); + } + + /** + * INetBandwidth: 购买独立IP需要此参数,其中一个ip的带宽值。 + * + * @param int $iNetBandwidth + */ + public function setINetBandwidth($iNetBandwidth) + { + $this->set("INetBandwidth", $iNetBandwidth); + } + + /** + * IpCount: 购买独立IP需要此参数。需要的eip数量。 + * + * @return integer|null + */ + public function getIpCount() + { + return $this->get("IpCount"); + } + + /** + * IpCount: 购买独立IP需要此参数。需要的eip数量。 + * + * @param int $ipCount + */ + public function setIpCount($ipCount) + { + $this->set("IpCount", $ipCount); + } +} diff --git a/src/UPhone/Apis/GetUPhonePriceResponse.php b/src/UPhone/Apis/GetUPhonePriceResponse.php new file mode 100644 index 00000000..f5774d58 --- /dev/null +++ b/src/UPhone/Apis/GetUPhonePriceResponse.php @@ -0,0 +1,57 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; +use UCloud\UPhone\Models\UPhonePriceSet; + +class GetUPhonePriceResponse extends Response +{ + + + /** + * PriceSet: 价格列表,每项参数见UPhonePriceSet + * + * @return UPhonePriceSet[]|null + */ + public function getPriceSet() + { + $items = $this->get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPhonePriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表,每项参数见UPhonePriceSet + * + * @param UPhonePriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPhone/Apis/GetUPhoneRenewPriceRequest.php b/src/UPhone/Apis/GetUPhoneRenewPriceRequest.php new file mode 100644 index 00000000..9a706a29 --- /dev/null +++ b/src/UPhone/Apis/GetUPhoneRenewPriceRequest.php @@ -0,0 +1,111 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class GetUPhoneRenewPriceRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "GetUPhoneRenewPrice"]); + $this->markRequired("UPhoneId"); + $this->markRequired("CityId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPhoneId: 云手机的唯一标识,可通过[查询云手机列表]获取。 + * + * @return string|null + */ + public function getUPhoneId() + { + return $this->get("UPhoneId"); + } + + /** + * UPhoneId: 云手机的唯一标识,可通过[查询云手机列表]获取。 + * + * @param string $uPhoneId + */ + public function setUPhoneId($uPhoneId) + { + $this->set("UPhoneId", $uPhoneId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * ChargeType: 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认返回全部计费方式对应的价格 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认返回全部计费方式对应的价格 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } +} diff --git a/src/UPhone/Apis/GetUPhoneRenewPriceResponse.php b/src/UPhone/Apis/GetUPhoneRenewPriceResponse.php new file mode 100644 index 00000000..7db99e46 --- /dev/null +++ b/src/UPhone/Apis/GetUPhoneRenewPriceResponse.php @@ -0,0 +1,57 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; +use UCloud\UPhone\Models\UPhonePriceSet; + +class GetUPhoneRenewPriceResponse extends Response +{ + + + /** + * PriceSet: 价格列表,具体参数见UPhonePriceSet + * + * @return UPhonePriceSet[]|null + */ + public function getPriceSet() + { + $items = $this->get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPhonePriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表,具体参数见UPhonePriceSet + * + * @param UPhonePriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPhone/Apis/GetUPhoneScreenCaptureRequest.php b/src/UPhone/Apis/GetUPhoneScreenCaptureRequest.php index 183ac4b7..213e2daf 100644 --- a/src/UPhone/Apis/GetUPhoneScreenCaptureRequest.php +++ b/src/UPhone/Apis/GetUPhoneScreenCaptureRequest.php @@ -70,7 +70,7 @@ public function setUPhoneID($uPhoneID) } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @return string|null */ @@ -80,7 +80,7 @@ public function getCityId() } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @param string $cityId */ @@ -88,4 +88,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/InstallUPhoneAppVersionRequest.php b/src/UPhone/Apis/InstallUPhoneAppVersionRequest.php index 97c1944e..ce929fc6 100644 --- a/src/UPhone/Apis/InstallUPhoneAppVersionRequest.php +++ b/src/UPhone/Apis/InstallUPhoneAppVersionRequest.php @@ -109,4 +109,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/PoweroffUPhoneRequest.php b/src/UPhone/Apis/PoweroffUPhoneRequest.php index 9db38736..b2be7d48 100644 --- a/src/UPhone/Apis/PoweroffUPhoneRequest.php +++ b/src/UPhone/Apis/PoweroffUPhoneRequest.php @@ -88,4 +88,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/PoweronUPhoneRequest.php b/src/UPhone/Apis/PoweronUPhoneRequest.php index c1a56035..ebffe98a 100644 --- a/src/UPhone/Apis/PoweronUPhoneRequest.php +++ b/src/UPhone/Apis/PoweronUPhoneRequest.php @@ -88,4 +88,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/RebootUPhoneRequest.php b/src/UPhone/Apis/RebootUPhoneRequest.php index dbbbf041..54a90a93 100644 --- a/src/UPhone/Apis/RebootUPhoneRequest.php +++ b/src/UPhone/Apis/RebootUPhoneRequest.php @@ -88,4 +88,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/RebootUPhoneResponse.php b/src/UPhone/Apis/RebootUPhoneResponse.php index b4bd99a9..e5557ac1 100644 --- a/src/UPhone/Apis/RebootUPhoneResponse.php +++ b/src/UPhone/Apis/RebootUPhoneResponse.php @@ -22,5 +22,23 @@ class RebootUPhoneResponse extends Response { + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } } diff --git a/src/UPhone/Apis/RenewUPhoneRequest.php b/src/UPhone/Apis/RenewUPhoneRequest.php new file mode 100644 index 00000000..df63344d --- /dev/null +++ b/src/UPhone/Apis/RenewUPhoneRequest.php @@ -0,0 +1,611 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class RenewUPhoneRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "RenewUPhone"]); + $this->markRequired("CityId"); + $this->markRequired("UPhoneIds"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * + * @return string[]|null + */ + public function getUPhoneIds() + { + return $this->get("UPhoneIds"); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * + * @param string[] $uPhoneIds + */ + public function setUPhoneIds(array $uPhoneIds) + { + $this->set("UPhoneIds", $uPhoneIds); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } + + /** + * Customize: 自定义设备参数设置的开关,true时会读取用户设置的下列设备参数信息;false时随机读取ucloud内置设备参数。默认false + * + * @return boolean|null + */ + public function getCustomize() + { + return $this->get("Customize"); + } + + /** + * Customize: 自定义设备参数设置的开关,true时会读取用户设置的下列设备参数信息;false时随机读取ucloud内置设备参数。默认false + * + * @param boolean $customize + */ + public function setCustomize($customize) + { + $this->set("Customize", $customize); + } + + /** + * Brand: 品牌 + * + * @return string|null + */ + public function getBrand() + { + return $this->get("Brand"); + } + + /** + * Brand: 品牌 + * + * @param string $brand + */ + public function setBrand($brand) + { + $this->set("Brand", $brand); + } + + /** + * Model: 设备型号 + * + * @return string|null + */ + public function getModel() + { + return $this->get("Model"); + } + + /** + * Model: 设备型号 + * + * @param string $model + */ + public function setModel($model) + { + $this->set("Model", $model); + } + + /** + * Manufacture: 厂商 + * + * @return string|null + */ + public function getManufacture() + { + return $this->get("Manufacture"); + } + + /** + * Manufacture: 厂商 + * + * @param string $manufacture + */ + public function setManufacture($manufacture) + { + $this->set("Manufacture", $manufacture); + } + + /** + * SerialNumber: 序列号 + * + * @return string|null + */ + public function getSerialNumber() + { + return $this->get("SerialNumber"); + } + + /** + * SerialNumber: 序列号 + * + * @param string $serialNumber + */ + public function setSerialNumber($serialNumber) + { + $this->set("SerialNumber", $serialNumber); + } + + /** + * BaseBand: 基带版本 + * + * @return string|null + */ + public function getBaseBand() + { + return $this->get("BaseBand"); + } + + /** + * BaseBand: 基带版本 + * + * @param string $baseBand + */ + public function setBaseBand($baseBand) + { + $this->set("BaseBand", $baseBand); + } + + /** + * Board: 主板名 + * + * @return string|null + */ + public function getBoard() + { + return $this->get("Board"); + } + + /** + * Board: 主板名 + * + * @param string $board + */ + public function setBoard($board) + { + $this->set("Board", $board); + } + + /** + * DisplayID: 显示的版本号 + * + * @return string|null + */ + public function getDisplayID() + { + return $this->get("DisplayID"); + } + + /** + * DisplayID: 显示的版本号 + * + * @param string $displayID + */ + public function setDisplayID($displayID) + { + $this->set("DisplayID", $displayID); + } + + /** + * Device: 设备名 + * + * @return string|null + */ + public function getDevice() + { + return $this->get("Device"); + } + + /** + * Device: 设备名 + * + * @param string $device + */ + public function setDevice($device) + { + $this->set("Device", $device); + } + + /** + * FingerPrint: 系统指纹 + * + * @return string|null + */ + public function getFingerPrint() + { + return $this->get("FingerPrint"); + } + + /** + * FingerPrint: 系统指纹 + * + * @param string $fingerPrint + */ + public function setFingerPrint($fingerPrint) + { + $this->set("FingerPrint", $fingerPrint); + } + + /** + * ProductName: 产品名称 + * + * @return string|null + */ + public function getProductName() + { + return $this->get("ProductName"); + } + + /** + * ProductName: 产品名称 + * + * @param string $productName + */ + public function setProductName($productName) + { + $this->set("ProductName", $productName); + } + + /** + * BuildID: build的版本号 + * + * @return string|null + */ + public function getBuildID() + { + return $this->get("BuildID"); + } + + /** + * BuildID: build的版本号 + * + * @param string $buildID + */ + public function setBuildID($buildID) + { + $this->set("BuildID", $buildID); + } + + /** + * BuildHost: 固件编译主机 + * + * @return string|null + */ + public function getBuildHost() + { + return $this->get("BuildHost"); + } + + /** + * BuildHost: 固件编译主机 + * + * @param string $buildHost + */ + public function setBuildHost($buildHost) + { + $this->set("BuildHost", $buildHost); + } + + /** + * BootLoader: bootloader版本号 + * + * @return string|null + */ + public function getBootLoader() + { + return $this->get("BootLoader"); + } + + /** + * BootLoader: bootloader版本号 + * + * @param string $bootLoader + */ + public function setBootLoader($bootLoader) + { + $this->set("BootLoader", $bootLoader); + } + + /** + * BuildTags: 系统标记 + * + * @return string|null + */ + public function getBuildTags() + { + return $this->get("BuildTags"); + } + + /** + * BuildTags: 系统标记 + * + * @param string $buildTags + */ + public function setBuildTags($buildTags) + { + $this->set("BuildTags", $buildTags); + } + + /** + * BuildVersionInc: 版本增加说明 + * + * @return string|null + */ + public function getBuildVersionInc() + { + return $this->get("BuildVersionInc"); + } + + /** + * BuildVersionInc: 版本增加说明 + * + * @param string $buildVersionInc + */ + public function setBuildVersionInc($buildVersionInc) + { + $this->set("BuildVersionInc", $buildVersionInc); + } + + /** + * IMEI: 串号 + * + * @return string|null + */ + public function getIMEI() + { + return $this->get("IMEI"); + } + + /** + * IMEI: 串号 + * + * @param string $imei + */ + public function setIMEI($imei) + { + $this->set("IMEI", $imei); + } + + /** + * PhoneNumber: 手机号码 + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->get("PhoneNumber"); + } + + /** + * PhoneNumber: 手机号码 + * + * @param string $phoneNumber + */ + public function setPhoneNumber($phoneNumber) + { + $this->set("PhoneNumber", $phoneNumber); + } + + /** + * ICCID: SIM卡唯一标识 + * + * @return string|null + */ + public function getICCID() + { + return $this->get("ICCID"); + } + + /** + * ICCID: SIM卡唯一标识 + * + * @param string $iccid + */ + public function setICCID($iccid) + { + $this->set("ICCID", $iccid); + } + + /** + * IMSI: 移动识别码 + * + * @return string|null + */ + public function getIMSI() + { + return $this->get("IMSI"); + } + + /** + * IMSI: 移动识别码 + * + * @param string $imsi + */ + public function setIMSI($imsi) + { + $this->set("IMSI", $imsi); + } + + /** + * IMEISV: 移动设备标识码软件 + * + * @return string|null + */ + public function getIMEISV() + { + return $this->get("IMEISV"); + } + + /** + * IMEISV: 移动设备标识码软件 + * + * @param string $imeisv + */ + public function setIMEISV($imeisv) + { + $this->set("IMEISV", $imeisv); + } + + /** + * RadioMac: 移动网络mac地址 + * + * @return string|null + */ + public function getRadioMac() + { + return $this->get("RadioMac"); + } + + /** + * RadioMac: 移动网络mac地址 + * + * @param string $radioMac + */ + public function setRadioMac($radioMac) + { + $this->set("RadioMac", $radioMac); + } + + /** + * WiFiName: 当前连接Wi-Fi名称 + * + * @return string|null + */ + public function getWiFiName() + { + return $this->get("WiFiName"); + } + + /** + * WiFiName: 当前连接Wi-Fi名称 + * + * @param string $wiFiName + */ + public function setWiFiName($wiFiName) + { + $this->set("WiFiName", $wiFiName); + } + + /** + * BSSID: Wi-Fi 物理地址 + * + * @return string|null + */ + public function getBSSID() + { + return $this->get("BSSID"); + } + + /** + * BSSID: Wi-Fi 物理地址 + * + * @param string $bssid + */ + public function setBSSID($bssid) + { + $this->set("BSSID", $bssid); + } + + /** + * AndroidID: AOSP唯一标识 + * + * @return string|null + */ + public function getAndroidID() + { + return $this->get("AndroidID"); + } + + /** + * AndroidID: AOSP唯一标识 + * + * @param string $androidID + */ + public function setAndroidID($androidID) + { + $this->set("AndroidID", $androidID); + } +} diff --git a/src/UPhone/Apis/RenewUPhoneResponse.php b/src/UPhone/Apis/RenewUPhoneResponse.php new file mode 100644 index 00000000..dea2f7b6 --- /dev/null +++ b/src/UPhone/Apis/RenewUPhoneResponse.php @@ -0,0 +1,26 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; + +class RenewUPhoneResponse extends Response +{ + + + +} diff --git a/src/UPhone/Apis/ResetUPhoneRequest.php b/src/UPhone/Apis/ResetUPhoneRequest.php index 26bdaf6a..03a76bd7 100644 --- a/src/UPhone/Apis/ResetUPhoneRequest.php +++ b/src/UPhone/Apis/ResetUPhoneRequest.php @@ -88,4 +88,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/ResetUPhoneResponse.php b/src/UPhone/Apis/ResetUPhoneResponse.php index 45a74b12..d717f6ba 100644 --- a/src/UPhone/Apis/ResetUPhoneResponse.php +++ b/src/UPhone/Apis/ResetUPhoneResponse.php @@ -22,5 +22,23 @@ class ResetUPhoneResponse extends Response { + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } } diff --git a/src/UPhone/Apis/RunAsyncCommandRequest.php b/src/UPhone/Apis/RunAsyncCommandRequest.php index 11b7741f..af45fddd 100644 --- a/src/UPhone/Apis/RunAsyncCommandRequest.php +++ b/src/UPhone/Apis/RunAsyncCommandRequest.php @@ -109,4 +109,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/RunSyncCommandRequest.php b/src/UPhone/Apis/RunSyncCommandRequest.php index 2d20917b..626b3cee 100644 --- a/src/UPhone/Apis/RunSyncCommandRequest.php +++ b/src/UPhone/Apis/RunSyncCommandRequest.php @@ -109,4 +109,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/SetUPhoneCallbackRequest.php b/src/UPhone/Apis/SetUPhoneCallbackRequest.php new file mode 100644 index 00000000..ab259738 --- /dev/null +++ b/src/UPhone/Apis/SetUPhoneCallbackRequest.php @@ -0,0 +1,132 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class SetUPhoneCallbackRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "SetUPhoneCallback"]); + $this->markRequired("CityId"); + $this->markRequired("UPhoneId"); + $this->markRequired("URL"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市ID + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市ID + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneId: 云手机ID。 + * + * @return string|null + */ + public function getUPhoneId() + { + return $this->get("UPhoneId"); + } + + /** + * UPhoneId: 云手机ID。 + * + * @param string $uPhoneId + */ + public function setUPhoneId($uPhoneId) + { + $this->set("UPhoneId", $uPhoneId); + } + + /** + * URL: 接收POST请求的http接口。Content-Type:application/json; charset=UTF-8,Accept:application/json。 + * + * @return string|null + */ + public function getURL() + { + return $this->get("URL"); + } + + /** + * URL: 接收POST请求的http接口。Content-Type:application/json; charset=UTF-8,Accept:application/json。 + * + * @param string $url + */ + public function setURL($url) + { + $this->set("URL", $url); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UPhone/Apis/SetUPhoneCallbackResponse.php b/src/UPhone/Apis/SetUPhoneCallbackResponse.php new file mode 100644 index 00000000..8a89478a --- /dev/null +++ b/src/UPhone/Apis/SetUPhoneCallbackResponse.php @@ -0,0 +1,26 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; + +class SetUPhoneCallbackResponse extends Response +{ + + + +} diff --git a/src/UPhone/Apis/SetUPhoneConfigRequest.php b/src/UPhone/Apis/SetUPhoneConfigRequest.php index 621bfca4..1bbb8b20 100644 --- a/src/UPhone/Apis/SetUPhoneConfigRequest.php +++ b/src/UPhone/Apis/SetUPhoneConfigRequest.php @@ -70,7 +70,7 @@ public function setCityId($cityId) } /** - * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 * * @return string[]|null */ @@ -80,7 +80,7 @@ public function getUPhoneIds() } /** - * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 * * @param string[] $uPhoneIds */ @@ -130,7 +130,7 @@ public function setRefresh($refresh) } /** - * Bitrate: 云手机画面传输码率(例,8000)取值范围[100,5000] + * Bitrate: 云手机画面传输码率(例,8000)取值范围[100,50000] * * @return string|null */ @@ -140,7 +140,7 @@ public function getBitrate() } /** - * Bitrate: 云手机画面传输码率(例,8000)取值范围[100,5000] + * Bitrate: 云手机画面传输码率(例,8000)取值范围[100,50000] * * @param string $bitrate */ @@ -188,4 +188,24 @@ public function setDpi($dpi) { $this->set("Dpi", $dpi); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/SetUPhoneGPSRequest.php b/src/UPhone/Apis/SetUPhoneGPSRequest.php index a6a89f5f..12058f8d 100644 --- a/src/UPhone/Apis/SetUPhoneGPSRequest.php +++ b/src/UPhone/Apis/SetUPhoneGPSRequest.php @@ -100,4 +100,24 @@ public function setUPhoneGPSs(array $uPhoneGPSs) } return $result; } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/SetUPhoneManagerModeRequest.php b/src/UPhone/Apis/SetUPhoneManagerModeRequest.php index 2a85c07d..e171eeab 100644 --- a/src/UPhone/Apis/SetUPhoneManagerModeRequest.php +++ b/src/UPhone/Apis/SetUPhoneManagerModeRequest.php @@ -109,4 +109,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/SetUPhoneRootModeRequest.php b/src/UPhone/Apis/SetUPhoneRootModeRequest.php new file mode 100644 index 00000000..d413ce27 --- /dev/null +++ b/src/UPhone/Apis/SetUPhoneRootModeRequest.php @@ -0,0 +1,133 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Request\Request; + +class SetUPhoneRootModeRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "SetUPhoneRootMode"]); + $this->markRequired("ProjectId"); + $this->markRequired("CityId"); + $this->markRequired("UPhoneIds"); + $this->markRequired("Root"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @return string|null + */ + public function getCityId() + { + return $this->get("CityId"); + } + + /** + * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * + * @param string $cityId + */ + public function setCityId($cityId) + { + $this->set("CityId", $cityId); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * + * @return string[]|null + */ + public function getUPhoneIds() + { + return $this->get("UPhoneIds"); + } + + /** + * UPhoneIds: 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * + * @param string[] $uPhoneIds + */ + public function setUPhoneIds(array $uPhoneIds) + { + $this->set("UPhoneIds", $uPhoneIds); + } + + /** + * Root: true则打开Root权限;false则关闭Root权限 + * + * @return boolean|null + */ + public function getRoot() + { + return $this->get("Root"); + } + + /** + * Root: true则打开Root权限;false则关闭Root权限 + * + * @param boolean $root + */ + public function setRoot($root) + { + $this->set("Root", $root); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UPhone/Apis/SetUPhoneRootModeResponse.php b/src/UPhone/Apis/SetUPhoneRootModeResponse.php new file mode 100644 index 00000000..96ebf4b9 --- /dev/null +++ b/src/UPhone/Apis/SetUPhoneRootModeResponse.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Apis; + +use UCloud\Core\Response\Response; + +class SetUPhoneRootModeResponse extends Response +{ + + + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @return string|null + */ + public function getJobId() + { + return $this->get("JobId"); + } + + /** + * JobId: 异步请求成功后返回JobId,用以查询Job状态 + * + * @param string $jobId + */ + public function setJobId($jobId) + { + $this->set("JobId", $jobId); + } +} diff --git a/src/UPhone/Apis/SetUPhoneSplashScreenRequest.php b/src/UPhone/Apis/SetUPhoneSplashScreenRequest.php index a5f567e9..95346df2 100644 --- a/src/UPhone/Apis/SetUPhoneSplashScreenRequest.php +++ b/src/UPhone/Apis/SetUPhoneSplashScreenRequest.php @@ -109,4 +109,24 @@ public function setCityId($cityId) { $this->set("CityId", $cityId); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/SetUPhoneTokenRequest.php b/src/UPhone/Apis/SetUPhoneTokenRequest.php index a6eada44..ba8c0034 100644 --- a/src/UPhone/Apis/SetUPhoneTokenRequest.php +++ b/src/UPhone/Apis/SetUPhoneTokenRequest.php @@ -70,7 +70,7 @@ public function setUPhoneId($uPhoneId) } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @return string|null */ @@ -80,7 +80,7 @@ public function getCityId() } /** - * CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * * @param string $cityId */ @@ -108,4 +108,24 @@ public function setToken($token) { $this->set("Token", $token); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/UnInstallUPhoneAppVersionRequest.php b/src/UPhone/Apis/UnInstallUPhoneAppVersionRequest.php index 7e590cad..5e15cd6c 100644 --- a/src/UPhone/Apis/UnInstallUPhoneAppVersionRequest.php +++ b/src/UPhone/Apis/UnInstallUPhoneAppVersionRequest.php @@ -109,4 +109,24 @@ public function setUPhoneIds(array $uPhoneIds) { $this->set("UPhoneIds", $uPhoneIds); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Apis/UpdateUPhoneImageRequest.php b/src/UPhone/Apis/UpdateUPhoneImageRequest.php index 435a9eb7..1e9261d0 100644 --- a/src/UPhone/Apis/UpdateUPhoneImageRequest.php +++ b/src/UPhone/Apis/UpdateUPhoneImageRequest.php @@ -107,4 +107,24 @@ public function setDescription($description) { $this->set("Description", $description); } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } } diff --git a/src/UPhone/Models/StockInfo.php b/src/UPhone/Models/StockInfo.php new file mode 100644 index 00000000..6dd14cf2 --- /dev/null +++ b/src/UPhone/Models/StockInfo.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Models; + +use UCloud\Core\Response\Response; + +class StockInfo extends Response +{ + + + /** + * ModelName: ServerModel名称 + * + * @return string|null + */ + public function getModelName() + { + return $this->get("ModelName"); + } + + /** + * ModelName: ServerModel名称 + * + * @param string $modelName + */ + public function setModelName($modelName) + { + $this->set("ModelName", $modelName); + } + + /** + * StockCount: 资源余量 + * + * @return integer|null + */ + public function getStockCount() + { + return $this->get("StockCount"); + } + + /** + * StockCount: 资源余量 + * + * @param int $stockCount + */ + public function setStockCount($stockCount) + { + $this->set("StockCount", $stockCount); + } +} diff --git a/src/UPhone/Models/UPhoneAllowance.php b/src/UPhone/Models/UPhoneAllowance.php new file mode 100644 index 00000000..069b566b --- /dev/null +++ b/src/UPhone/Models/UPhoneAllowance.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Models; + +use UCloud\Core\Response\Response; + +class UPhoneAllowance extends Response +{ + + + /** + * ModelName: 枚举值,云手机型号名称,取值:UPhone X,UPhone Plus,UPhone Pro + * + * @return string|null + */ + public function getModelName() + { + return $this->get("ModelName"); + } + + /** + * ModelName: 枚举值,云手机型号名称,取值:UPhone X,UPhone Plus,UPhone Pro + * + * @param string $modelName + */ + public function setModelName($modelName) + { + $this->set("ModelName", $modelName); + } + + /** + * Allowance: 可创建云手机个数 + * + * @return integer|null + */ + public function getAllowance() + { + return $this->get("Allowance"); + } + + /** + * Allowance: 可创建云手机个数 + * + * @param int $allowance + */ + public function setAllowance($allowance) + { + $this->set("Allowance", $allowance); + } +} diff --git a/src/UPhone/Models/UPhoneDetailInstance.php b/src/UPhone/Models/UPhoneDetailInstance.php index b6917aab..60676082 100644 --- a/src/UPhone/Models/UPhoneDetailInstance.php +++ b/src/UPhone/Models/UPhoneDetailInstance.php @@ -43,7 +43,7 @@ public function setUPhoneName($uPhoneName) } /** - * UPhoneId: 云手机规格名称 + * UPhoneId: 云手机的唯一标识,不超过32个字节。 * * @return string|null */ @@ -53,7 +53,7 @@ public function getUPhoneId() } /** - * UPhoneId: 云手机规格名称 + * UPhoneId: 云手机的唯一标识,不超过32个字节。 * * @param string $uPhoneId */ @@ -62,6 +62,26 @@ public function setUPhoneId($uPhoneId) $this->set("UPhoneId", $uPhoneId); } + /** + * UPhoneModelName: 云手机规格名称 + * + * @return string|null + */ + public function getUPhoneModelName() + { + return $this->get("UPhoneModelName"); + } + + /** + * UPhoneModelName: 云手机规格名称 + * + * @param string $uPhoneModelName + */ + public function setUPhoneModelName($uPhoneModelName) + { + $this->set("UPhoneModelName", $uPhoneModelName); + } + /** * CPU: 虚拟CPU核数。 * diff --git a/src/UPhone/Models/UPhoneInstance.php b/src/UPhone/Models/UPhoneInstance.php index 2e9a643c..0806dd0f 100644 --- a/src/UPhone/Models/UPhoneInstance.php +++ b/src/UPhone/Models/UPhoneInstance.php @@ -401,4 +401,84 @@ public function setRemark($remark) { $this->set("Remark", $remark); } + + /** + * ChargeType: 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ExpireTime: 到期时间;格式为Unix时间戳 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间;格式为Unix时间戳 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * IpRegion: IP所属地域Id,eg: hk,th-bkk + * + * @return string|null + */ + public function getIpRegion() + { + return $this->get("IpRegion"); + } + + /** + * IpRegion: IP所属地域Id,eg: hk,th-bkk + * + * @param string $ipRegion + */ + public function setIpRegion($ipRegion) + { + $this->set("IpRegion", $ipRegion); + } + + /** + * Ip: 云手机IP地址 + * + * @return string|null + */ + public function getIp() + { + return $this->get("Ip"); + } + + /** + * Ip: 云手机IP地址 + * + * @param string $ip + */ + public function setIp($ip) + { + $this->set("Ip", $ip); + } } diff --git a/src/UPhone/Models/UPhoneModelInstance.php b/src/UPhone/Models/UPhoneModelInstance.php index 0b60a6eb..3c1b1970 100644 --- a/src/UPhone/Models/UPhoneModelInstance.php +++ b/src/UPhone/Models/UPhoneModelInstance.php @@ -141,4 +141,44 @@ public function setRefresh($refresh) { $this->set("Refresh", $refresh); } + + /** + * Dpi: DPI + * + * @return integer|null + */ + public function getDpi() + { + return $this->get("Dpi"); + } + + /** + * Dpi: DPI + * + * @param int $dpi + */ + public function setDpi($dpi) + { + $this->set("Dpi", $dpi); + } + + /** + * Description: 型号描述信息 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 型号描述信息 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } } diff --git a/src/UPhone/Models/UPhonePriceSet.php b/src/UPhone/Models/UPhonePriceSet.php new file mode 100644 index 00000000..d8a1d7a8 --- /dev/null +++ b/src/UPhone/Models/UPhonePriceSet.php @@ -0,0 +1,104 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\UPhone\Models; + +use UCloud\Core\Response\Response; + +class UPhonePriceSet extends Response +{ + + + /** + * ChargeType: 计费类型,枚举值:Year,Month,Dynamic + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,枚举值:Year,Month,Dynamic + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格,单位: 元,保留小数点后两位有效数字 + * + * @return float|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格,单位: 元,保留小数点后两位有效数字 + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 限时优惠的折前原价(即列表价乘以商务折扣后的单价) + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 限时优惠的折前原价(即列表价乘以商务折扣后的单价) + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ListPrice: 产品列表价 + * + * @return float|null + */ + public function getListPrice() + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 产品列表价 + * + * @param float $listPrice + */ + public function setListPrice($listPrice) + { + $this->set("ListPrice", $listPrice); + } +} diff --git a/src/UPhone/Models/UPhoneServerPriceSet.php b/src/UPhone/Models/UPhoneServerPriceSet.php index b22ef534..c79c39f1 100644 --- a/src/UPhone/Models/UPhoneServerPriceSet.php +++ b/src/UPhone/Models/UPhoneServerPriceSet.php @@ -23,7 +23,7 @@ class UPhoneServerPriceSet extends Response /** - * ChargeType: 计费类型,枚举值:Year,Month + * ChargeType: 计费类型,枚举值:Year,Month, Dynamic * * @return string|null */ @@ -33,7 +33,7 @@ public function getChargeType() } /** - * ChargeType: 计费类型,枚举值:Year,Month + * ChargeType: 计费类型,枚举值:Year,Month, Dynamic * * @param string $chargeType */ diff --git a/src/UPhone/UPhoneClient.php b/src/UPhone/UPhoneClient.php index 5dbc367b..2a2c6db0 100644 --- a/src/UPhone/UPhoneClient.php +++ b/src/UPhone/UPhoneClient.php @@ -18,6 +18,8 @@ use UCloud\Core\Client; use UCloud\Core\Exception\UCloudException; +use UCloud\UPhone\Apis\CreateUPhoneRequest; +use UCloud\UPhone\Apis\CreateUPhoneResponse; use UCloud\UPhone\Apis\CreateUPhoneAppRequest; use UCloud\UPhone\Apis\CreateUPhoneAppResponse; use UCloud\UPhone\Apis\CreateUPhoneAppVersionRequest; @@ -26,6 +28,8 @@ use UCloud\UPhone\Apis\CreateUPhoneImageResponse; use UCloud\UPhone\Apis\CreateUPhoneServerRequest; use UCloud\UPhone\Apis\CreateUPhoneServerResponse; +use UCloud\UPhone\Apis\DeleteUPhoneRequest; +use UCloud\UPhone\Apis\DeleteUPhoneResponse; use UCloud\UPhone\Apis\DeleteUPhoneImageRequest; use UCloud\UPhone\Apis\DeleteUPhoneImageResponse; use UCloud\UPhone\Apis\DeleteUPhoneServerRequest; @@ -52,6 +56,12 @@ use UCloud\UPhone\Apis\DescribeUPhoneServerResponse; use UCloud\UPhone\Apis\DescribeUPhoneServerModelRequest; use UCloud\UPhone\Apis\DescribeUPhoneServerModelResponse; +use UCloud\UPhone\Apis\GetUPhoneAllowanceRequest; +use UCloud\UPhone\Apis\GetUPhoneAllowanceResponse; +use UCloud\UPhone\Apis\GetUPhonePriceRequest; +use UCloud\UPhone\Apis\GetUPhonePriceResponse; +use UCloud\UPhone\Apis\GetUPhoneRenewPriceRequest; +use UCloud\UPhone\Apis\GetUPhoneRenewPriceResponse; use UCloud\UPhone\Apis\GetUPhoneScreenCaptureRequest; use UCloud\UPhone\Apis\GetUPhoneScreenCaptureResponse; use UCloud\UPhone\Apis\GetUPhoneServerPriceRequest; @@ -74,18 +84,24 @@ use UCloud\UPhone\Apis\PoweronUPhoneResponse; use UCloud\UPhone\Apis\RebootUPhoneRequest; use UCloud\UPhone\Apis\RebootUPhoneResponse; +use UCloud\UPhone\Apis\RenewUPhoneRequest; +use UCloud\UPhone\Apis\RenewUPhoneResponse; use UCloud\UPhone\Apis\ResetUPhoneRequest; use UCloud\UPhone\Apis\ResetUPhoneResponse; use UCloud\UPhone\Apis\RunAsyncCommandRequest; use UCloud\UPhone\Apis\RunAsyncCommandResponse; use UCloud\UPhone\Apis\RunSyncCommandRequest; use UCloud\UPhone\Apis\RunSyncCommandResponse; +use UCloud\UPhone\Apis\SetUPhoneCallbackRequest; +use UCloud\UPhone\Apis\SetUPhoneCallbackResponse; use UCloud\UPhone\Apis\SetUPhoneConfigRequest; use UCloud\UPhone\Apis\SetUPhoneConfigResponse; use UCloud\UPhone\Apis\SetUPhoneGPSRequest; use UCloud\UPhone\Apis\SetUPhoneGPSResponse; use UCloud\UPhone\Apis\SetUPhoneManagerModeRequest; use UCloud\UPhone\Apis\SetUPhoneManagerModeResponse; +use UCloud\UPhone\Apis\SetUPhoneRootModeRequest; +use UCloud\UPhone\Apis\SetUPhoneRootModeResponse; use UCloud\UPhone\Apis\SetUPhoneSplashScreenRequest; use UCloud\UPhone\Apis\SetUPhoneSplashScreenResponse; use UCloud\UPhone\Apis\SetUPhoneTokenRequest; @@ -101,6 +117,46 @@ class UPhoneClient extends Client { + /** + * CreateUPhone - 创建云手机 + * + * See also: https://docs.ucloud.cn/api/uphone-api/create_u_phone + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 云手机实例名称,默认:UPhone。如果同时创建多个,则增加数字后缀,如UPhone-1 + * "UPhoneModelName" => (string) 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表]()查询支持的云手机规格。 + * "MediaBandwidth" => (integer) 云手机画面带宽,默认2M + * "ImageId" => (string) 云手机镜像ID,不超过32个字节。可通过[查询手机镜像]()查询云手机规格对应的镜像ID。 + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "UPhoneCount" => (integer) 创建云手机的个数 + * "ChargeType" => (string) 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * "Quantity" => (string) 购买时长。默认值: 1。月付时,此参数传0,代表购买至月末。 + * "IpDestRegion" => (string) 购买独立IP必须有此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Tag" => (string) 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * "BindIp" => (boolean) 绑定独立IP + * "Bandwidth" => (integer) 独立IP带宽 + * "IpProportion" => (integer) 独立IP参数。需要独立IP的比例。eg: [4:1]->4, [3:1]->3。 + * "CouponId" => (string) 云手机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看。注:代金券对带宽不适用,仅适用于云手机计费 + * ] + * + * Outputs: + * + * $outputs = [ + * "JobId" => (string) 任务ID,用来查询创建云手机任务状态 + * ] + * + * @return CreateUPhoneResponse + * @throws UCloudException + */ + public function createUPhone(CreateUPhoneRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUPhoneResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateUPhoneApp - 一个 app 对应多个 app_version。 * @@ -112,6 +168,7 @@ class UPhoneClient extends Client * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Name" => (string) 应用名称。 * "Description" => (string) 应用描述。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -143,6 +200,7 @@ public function createUPhoneApp(CreateUPhoneAppRequest $request = null) * "AppId" => (string) 应用的唯一标识ID。 * "URL" => (string) 应用版本相关的Apk文件存放的公网URL地址。 * "Description" => (string) 应用版本描述。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -169,16 +227,18 @@ public function createUPhoneAppVersion(CreateUPhoneAppVersionRequest $request = * * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "CityId" => (string) 城市Id,通过[获取城市列表](https://cms-docs.ucloudadmin.com/api/uphone-api/describe_u_phone_cities)获取 * "UPhoneId" => (string) 手机实例的资源ID * "Name" => (string) 镜像名称。长度为2~128个英文或中文字符。 * "Description" => (string) 镜像的描述信息。长度为2~256个英文或中文字符 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: * * $outputs = [ * "ImageId" => (string) 云手机自定义镜像资源 ID + * "JobId" => (string) 请求的唯一标识Id,`RetCode`为0时返回,可根据此ID查询请求的执行状态 * ] * * @return CreateUPhoneImageResponse @@ -229,6 +289,35 @@ public function createUPhoneServer(CreateUPhoneServerRequest $request = null) return new CreateUPhoneServerResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteUPhone - 删除云手机 + * + * See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望获取信息的云手机 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * ] + * + * Outputs: + * + * $outputs = [ + * "JobId" => (string) 任务ID,用来查询删除云手机任务状态 + * ] + * + * @return DeleteUPhoneResponse + * @throws UCloudException + */ + public function deleteUPhone(DeleteUPhoneRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUPhoneResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DeleteUPhoneImage - 删除自制云手机镜像。 * @@ -257,7 +346,7 @@ public function deleteUPhoneImage(DeleteUPhoneImageRequest $request = null) } /** - * DeleteUPhoneServer - 删除云手机服务器。 注:关机状态下才能执行删除操作。 + * DeleteUPhoneServer - 删除云手机服务器。 * * See also: https://docs.ucloud.cn/api/uphone-api/delete_u_phone_server * @@ -301,6 +390,7 @@ public function deleteUPhoneServer(DeleteUPhoneServerRequest $request = null) * "Limit" => (integer) 返回数据长度,默认为200,最大200 * "Tag" => (string) 要查询的业务组名称 * "IsAll" => (boolean) 是否返回全部。如果有此参数,分页不生效。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -328,6 +418,10 @@ public function deleteUPhoneServer(DeleteUPhoneServerRequest $request = null) * "SplashScreen" => (string) 云手机启动图片URL链接 * "Callback" => (string) 云手机异步任务回调 * "Remark" => (string) 备注 + * "ChargeType" => (string) 计费模式。枚举值为: > 年 Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认为月付 + * "ExpireTime" => (integer) 到期时间;格式为Unix时间戳 + * "IpRegion" => (string) IP所属地域Id,eg: hk,th-bkk + * "Ip" => (string) 云手机IP地址 * ] * ] * ] @@ -353,6 +447,7 @@ public function describeUPhone(DescribeUPhoneRequest $request = null) * "AppIds" => (array<string>) 数组】应用的唯一标识 ID,调用方式举例:AppIds.0=希望获取应用信息的应用 1,AppIds.1=应用 2。 如果不传入,则返回当前 城市 所有符合条件的应用列表。 * "Offset" => (integer) 列表起始位置偏移量,默认为0 * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -393,6 +488,7 @@ public function describeUPhoneApp(DescribeUPhoneAppRequest $request = null) * "UPhoneId" => (string) 云手机Id。此参数表示查询手机上所安装的应用版本。 * "Limit" => (integer) 返回数据长度,默认为20,最大100 * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -431,6 +527,7 @@ public function describeUPhoneAppVersion(DescribeUPhoneAppVersionRequest $reques * * $args = [ * "ProjectId" => (string) + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -469,6 +566,7 @@ public function describeUPhoneCities(DescribeUPhoneCitiesRequest $request = null * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "Offset" => (integer) 列表起始位置偏移量,默认为0 * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -478,7 +576,8 @@ public function describeUPhoneCities(DescribeUPhoneCitiesRequest $request = null * "UPhoneDetails" => (array<object>) 带有应用版本的云手机实例,具体参数见数据模型 [UPhoneDetailInstanc](#UPhoneDetailInstanc)[ * [ * "UPhoneName" => (string) 云手机的名称,不超过65个字符。 - * "UPhoneId" => (string) 云手机规格名称 + * "UPhoneId" => (string) 云手机的唯一标识,不超过32个字节。 + * "UPhoneModelName" => (string) 云手机规格名称 * "CPU" => (integer) 虚拟CPU核数。 * "Memory" => (integer) 内存大小。单位MB * "DiskSize" => (integer) 磁盘大小,单位: GB @@ -528,6 +627,7 @@ public function describeUPhoneDetailByApp(DescribeUPhoneDetailByAppRequest $requ * "ImageIds" => (array<string>) 【数组】云手机镜像资源 ID,调用方式举例:ImageIds.0=希望获取信息的云手机镜像 1,ImageIds.1=云手机镜像 2。 如果不传入,则返回当前 城市 所有符合条件的云手机镜像。 * "Offset" => (string) 列表起始位置偏移量,默认为0 * "Limit" => (string) 最大返回镜像数量,默认为20,最大100 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -571,7 +671,7 @@ public function describeUPhoneImage(DescribeUPhoneImageRequest $request = null) } /** - * DescribeUPhoneIpRegions - 获取云手机支持绑定独立IP的城市列表 + * DescribeUPhoneIpRegions - 获取云手机所在城市支持绑定独立IP的地域列表 * * See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_ip_regions * @@ -579,7 +679,8 @@ public function describeUPhoneImage(DescribeUPhoneImageRequest $request = null) * * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "CityId" => (string) 城市Id,eg: cn-shanghai, cn-hangzhou + * "CityId" => (string) 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -613,11 +714,12 @@ public function describeUPhoneIpRegions(DescribeUPhoneIpRegionsRequest $request * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 - * "JobIds" => (array<string>) 【数组】Job 的唯一标识 Id,调用方式举例:ServerIds.0=希望查询状态的 Job1,ServerIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 + * "JobIds" => (array<string>) 【数组】Job 的唯一标识 Id,调用方式举例:JobIds.0=希望查询状态的 Job1,JobIds.1=Job2。 如果不传入,则返回当前 城市 所有符合条件的 Job 。 * "Offset" => (integer) 列表起始位置偏移量,默认为0 * "Limit" => (integer) 返回数据长度,默认为20,最大100 * "State" => (string) Job状态,枚举值:* 等待状态: PENDING;* 运行状态: RUNNING;* 成功状态: SUCCESS* 失败状态: FAILED* 部分成功状态:PARTIAL_SUCCESS * "Types" => (array<string>) 【数组】Job 类型,调用方式举例:JobTypes.0=希望查询的 Job 类型 1,JobTypes.1=Job 类型 2。 如果不传入,则返回当前 城市 所有符合条件的 Job 类型。Job 类型仅支持 INSTALL_APP、UNINSTALL_APP、RUN_ASYNC_COMMAND、CREATE_SERVER_AND_UPHONE、SET_UPHONE_GPS、SET_UPHONE_CONFIG、UPLOAD_FILE、DELETE_UPHONE + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -660,7 +762,7 @@ public function describeUPhoneJob(DescribeUPhoneJobRequest $request = null) } /** - * DescribeUPhoneModel - + * DescribeUPhoneModel - 获取云手机规格列表。两种类型:uphone代表单云手机场景、uphone-server代表云手机服务器场景。 * * See also: https://docs.ucloud.cn/api/uphone-api/describe_u_phone_model * @@ -671,6 +773,7 @@ public function describeUPhoneJob(DescribeUPhoneJobRequest $request = null) * "UPhoneModelNames" => (array<string>) 【数组】要获得信息的 UPhoneModel 名称。调用方式举例:UPhoneModelNames.0=希望获取信息的 UPhoneModel1,UPhoneModelNames.1=UPhoneModel2。 如果不传入,则返回当前 城市 所有符合条件的 UPhoneModel。 * "Offset" => (integer) 列表起始位置偏移量,默认为0 * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -685,6 +788,8 @@ public function describeUPhoneJob(DescribeUPhoneJobRequest $request = null) * "DiskSize" => (integer) 磁盘大小,单位: GB * "Resolution" => (string) 分辨率 * "Refresh" => (integer) 刷新率 + * "Dpi" => (integer) DPI + * "Description" => (string) 型号描述信息 * ] * ] * ] @@ -792,6 +897,12 @@ public function describeUPhoneServer(DescribeUPhoneServerRequest $request = null * * $outputs = [ * "TotalCount" => (integer) ServerModelInstance总数 + * "Stock" => (array<object>) 服务器model的库存[ + * [ + * "ModelName" => (string) ServerModel名称 + * "StockCount" => (integer) 资源余量 + * ] + * ] * "ServerModels" => (array<object>) ServerModel实例列表,每项参数可见数据模型 ServerModelInstance[ * [ * "ServerModelName" => (string) ServerModel名称 @@ -826,6 +937,116 @@ public function describeUPhoneServerModel(DescribeUPhoneServerModelRequest $requ return new DescribeUPhoneServerModelResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetUPhoneAllowance - 获取云手机创建余量 + * + * See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_allowance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "UPhoneAllowance" => (array<object>) 手机型号以及可创建数量[ + * [ + * "ModelName" => (string) 枚举值,云手机型号名称,取值:UPhone X,UPhone Plus,UPhone Pro + * "Allowance" => (integer) 可创建云手机个数 + * ] + * ] + * ] + * + * @return GetUPhoneAllowanceResponse + * @throws UCloudException + */ + public function getUPhoneAllowance(GetUPhoneAllowanceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPhoneAllowanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPhonePrice - 根据云手机规格名称,获取UPhone实例的价格。 + * + * See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "UPhoneModelName" => (integer) 云手机规格名称 + * "MediaBandwidth" => (integer) 云手机画面带宽值,画面带宽和手机强绑定关系,必须和手机数量对应。 + * "UPhoneCount" => (integer) 云手机个数 + * "ChargeType" => (string) 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 如果不传某个枚举值,默认返回年付、月付的价格组合集。 + * "Quantity" => (integer) 购买时长。默认: 1。 月付时,此参数传0,代表了购买至月末。 + * "IpDestRegion" => (string) 购买独立IP必须此参数。绑定的目的地域。参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "INetBandwidth" => (integer) 购买独立IP需要此参数,其中一个ip的带宽值。 + * "IpCount" => (integer) 购买独立IP需要此参数。需要的eip数量。 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array<object>) 价格列表,每项参数见UPhonePriceSet[ + * [ + * "ChargeType" => (string) 计费类型,枚举值:Year,Month,Dynamic + * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 + * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价) + * "ListPrice" => (number) 产品列表价 + * ] + * ] + * ] + * + * @return GetUPhonePriceResponse + * @throws UCloudException + */ + public function getUPhonePrice(GetUPhonePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPhonePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPhoneRenewPrice - 获取云手机续费价格,不包括独立ip价格。 + * + * See also: https://docs.ucloud.cn/api/uphone-api/get_u_phone_renew_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UPhoneId" => (string) 云手机的唯一标识,可通过[查询云手机列表]获取。 + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "ChargeType" => (string) 计费模式。枚举值为: > Year,按年付费; > Month,按月付费; > Dynamic,按小时预付费; 默认返回全部计费方式对应的价格 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array<object>) 价格列表,具体参数见UPhonePriceSet[ + * [ + * "ChargeType" => (string) 计费类型,枚举值:Year,Month,Dynamic + * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 + * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价) + * "ListPrice" => (number) 产品列表价 + * ] + * ] + * ] + * + * @return GetUPhoneRenewPriceResponse + * @throws UCloudException + */ + public function getUPhoneRenewPrice(GetUPhoneRenewPriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPhoneRenewPriceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetUPhoneScreenCapture - 云手机截屏 * @@ -836,7 +1057,8 @@ public function describeUPhoneServerModel(DescribeUPhoneServerModelRequest $requ * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "UPhoneID" => (string) 云手机ID - * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "CityId" => (string) 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -877,7 +1099,7 @@ public function getUPhoneScreenCapture(GetUPhoneScreenCaptureRequest $request = * $outputs = [ * "PriceSet" => (array<object>) 价格列表,每项参数见UPhoneServerPriceSet[ * [ - * "ChargeType" => (string) 计费类型,枚举值:Year,Month + * "ChargeType" => (string) 计费类型,枚举值:Year,Month, Dynamic * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价) * "ListPrice" => (number) 产品列表价 @@ -915,7 +1137,7 @@ public function getUPhoneServerPrice(GetUPhoneServerPriceRequest $request = null * $outputs = [ * "PriceSet" => (array<object>) 价格列表,具体参数见UPhoneServerPriceSet [ * [ - * "ChargeType" => (string) 计费类型,枚举值:Year,Month + * "ChargeType" => (string) 计费类型,枚举值:Year,Month, Dynamic * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价) * "ListPrice" => (number) 产品列表价 @@ -944,6 +1166,7 @@ public function getUPhoneServerRenewPrice(GetUPhoneServerRenewPriceRequest $requ * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "AppVersionId" => (string) 应用版本的唯一标识ID * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望安装应用的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1088,6 +1311,7 @@ public function modifyUPhoneServerRemark(ModifyUPhoneServerRemarkRequest $reques * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望关闭的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1115,6 +1339,7 @@ public function poweroffUPhone(PoweroffUPhoneRequest $request = null) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源ID,调用方式举例:UPhoneIds.0=希望开启的云手机实例1的UPhoneId,UPhoneIds.1=云手机实例2的UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1142,11 +1367,13 @@ public function poweronUPhone(PoweronUPhoneRequest $request = null) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: * * $outputs = [ + * "JobId" => (string) 异步请求成功后返回JobId,用以查询Job状态 * ] * * @return RebootUPhoneResponse @@ -1158,6 +1385,59 @@ public function rebootUPhone(RebootUPhoneRequest $request = null) return new RebootUPhoneResponse($resp->toArray(), $resp->getRequestId()); } + /** + * RenewUPhone - 修改UPhone的device_id、imei、meid 以及其他相关配置,达到一键新机的效果 + * + * See also: https://docs.ucloud.cn/api/uphone-api/renew_u_phone + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * "Customize" => (boolean) 自定义设备参数设置的开关,true时会读取用户设置的下列设备参数信息;false时随机读取ucloud内置设备参数。默认false + * "Brand" => (string) 品牌 + * "Model" => (string) 设备型号 + * "Manufacture" => (string) 厂商 + * "SerialNumber" => (string) 序列号 + * "BaseBand" => (string) 基带版本 + * "Board" => (string) 主板名 + * "DisplayID" => (string) 显示的版本号 + * "Device" => (string) 设备名 + * "FingerPrint" => (string) 系统指纹 + * "ProductName" => (string) 产品名称 + * "BuildID" => (string) build的版本号 + * "BuildHost" => (string) 固件编译主机 + * "BootLoader" => (string) bootloader版本号 + * "BuildTags" => (string) 系统标记 + * "BuildVersionInc" => (string) 版本增加说明 + * "IMEI" => (string) 串号 + * "PhoneNumber" => (string) 手机号码 + * "ICCID" => (string) SIM卡唯一标识 + * "IMSI" => (string) 移动识别码 + * "IMEISV" => (string) 移动设备标识码软件 + * "RadioMac" => (string) 移动网络mac地址 + * "WiFiName" => (string) 当前连接Wi-Fi名称 + * "BSSID" => (string) Wi-Fi 物理地址 + * "AndroidID" => (string) AOSP唯一标识 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RenewUPhoneResponse + * @throws UCloudException + */ + public function renewUPhone(RenewUPhoneRequest $request = null) + { + $resp = $this->invoke($request); + return new RenewUPhoneResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ResetUPhone - 将云手机恢复为创建时的状态。 * @@ -1169,11 +1449,13 @@ public function rebootUPhone(RebootUPhoneRequest $request = null) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重置的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: * * $outputs = [ + * "JobId" => (string) 异步请求成功后返回JobId,用以查询Job状态 * ] * * @return ResetUPhoneResponse @@ -1197,6 +1479,7 @@ public function resetUPhone(ResetUPhoneRequest $request = null) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "Content" => (string) 待执行的命令。 * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望执行命令的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1226,6 +1509,7 @@ public function runAsyncCommand(RunAsyncCommandRequest $request = null) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "Content" => (string) 待执行的命令。 * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望执行命令的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1248,6 +1532,35 @@ public function runSyncCommand(RunSyncCommandRequest $request = null) return new RunSyncCommandResponse($resp->toArray(), $resp->getRequestId()); } + /** + * SetUPhoneCallback - 设置云手机异步操作以及状态更新回调,支持云手机重置,安装应用,卸载应用,设备占用状态回调 + * + * See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_callback + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市ID + * "UPhoneId" => (string) 云手机ID。 + * "URL" => (string) 接收POST请求的http接口。Content-Type:application/json; charset=UTF-8,Accept:application/json。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return SetUPhoneCallbackResponse + * @throws UCloudException + */ + public function setUPhoneCallback(SetUPhoneCallbackRequest $request = null) + { + $resp = $this->invoke($request); + return new SetUPhoneCallbackResponse($resp->toArray(), $resp->getRequestId()); + } + /** * SetUPhoneConfig - 设置云手机画面参数(分辨率、DPI、帧率、码率) * @@ -1258,12 +1571,13 @@ public function runSyncCommand(RunSyncCommandRequest $request = null) * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 - * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 * "Resolution" => (string) 云手机画面分辨率(宽x高) (例,1920x1080,中间是字母x)宽和高的取值范围[100,5000] * "Refresh" => (string) 云手机画面刷新率,即帧率(例,30)取值范围[1,200] - * "Bitrate" => (string) 云手机画面传输码率(例,8000)取值范围[100,5000] + * "Bitrate" => (string) 云手机画面传输码率(例,8000)取值范围[100,50000] * "Async" => (string) 异步请求开关,只有为1的时候才是异步,不填或者其他数值为同步 * "Dpi" => (string) 云手机dpi,取值范围[100,1000] + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1306,6 +1620,7 @@ public function setUPhoneConfig(SetUPhoneConfigRequest $request = null) * "Altitude" => (number) 海拔 * ] * ] + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1335,6 +1650,7 @@ public function setUPhoneGPS(SetUPhoneGPSRequest $request = null) * "UPhoneId" => (string) 云手机实例的资源ID * "Mode" => (string) 管理模式:管理员admin,普通用户user * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1351,6 +1667,36 @@ public function setUPhoneManagerMode(SetUPhoneManagerModeRequest $request = null return new SetUPhoneManagerModeResponse($resp->toArray(), $resp->getRequestId()); } + /** + * SetUPhoneRootMode - 设置云手机Root模式 + * + * See also: https://docs.ucloud.cn/api/uphone-api/set_u_phone_root_mode + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望重启的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "Root" => (boolean) true则打开Root权限;false则关闭Root权限 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 + * ] + * + * Outputs: + * + * $outputs = [ + * "JobId" => (string) 异步请求成功后返回JobId,用以查询Job状态 + * ] + * + * @return SetUPhoneRootModeResponse + * @throws UCloudException + */ + public function setUPhoneRootMode(SetUPhoneRootModeRequest $request = null) + { + $resp = $this->invoke($request); + return new SetUPhoneRootModeResponse($resp->toArray(), $resp->getRequestId()); + } + /** * SetUPhoneSplashScreen - 设置云手机启动画面,通过DescribeUPhone接口可以查询该地址 * @@ -1363,6 +1709,7 @@ public function setUPhoneManagerMode(SetUPhoneManagerModeRequest $request = null * "URL" => (string) 启动画面下载地址 * "UPhoneId" => (string) 云手机ID * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1389,8 +1736,9 @@ public function setUPhoneSplashScreen(SetUPhoneSplashScreenRequest $request = nu * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "UPhoneId" => (string) 云手机ID - * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 + * "CityId" => (string) 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取 * "Token" => (string) RTC连接Token,为空表示清空Token + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1419,6 +1767,7 @@ public function setUPhoneToken(SetUPhoneTokenRequest $request = null) * "CityId" => (string) 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取 * "AppVersionId" => (string) 应用版本的唯一标识ID * "UPhoneIds" => (array<string>) 【数组】云手机实例的资源 ID,调用方式举例:UPhoneIds.0=希望卸载应用的云手机实例 1 的 UPhoneId,UPhoneIds.1=云手机实例 2 的 UPhoneId。 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: @@ -1448,6 +1797,7 @@ public function unInstallUPhoneAppVersion(UnInstallUPhoneAppVersionRequest $requ * "ImageId" => (string) 云手机自定义镜像资源ID * "Name" => (string) 镜像名称。长度为2~128个英文或中文字符。 * "Description" => (string) 镜像的描述信息。长度为2~256个英文或中文字符 + * "ProductType" => (string) 枚举值。当前操作的产品类型,1、uphone:云手机场景;2、uphone-server:云手机服务器场景。默认云手机服务器场景。 * ] * * Outputs: diff --git a/src/UVMS/Apis/SendUVMSMessageRequest.php b/src/UVMS/Apis/SendUVMSMessageRequest.php index d259d47b..199bc02d 100644 --- a/src/UVMS/Apis/SendUVMSMessageRequest.php +++ b/src/UVMS/Apis/SendUVMSMessageRequest.php @@ -23,54 +23,12 @@ class SendUVMSMessageRequest extends Request public function __construct() { parent::__construct(["Action" => "SendUVMSMessage"]); - $this->markRequired("Region"); - $this->markRequired("Zone"); $this->markRequired("CalledNumber"); $this->markRequired("TemplateId"); } - /** - * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * - * @return string|null - */ - public function getRegion() - { - return $this->get("Region"); - } - - /** - * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * - * @param string $region - */ - public function setRegion($region) - { - $this->set("Region", $region); - } - - /** - * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * - * @return string|null - */ - public function getZone() - { - return $this->get("Zone"); - } - - /** - * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * - * @param string $zone - */ - public function setZone($zone) - { - $this->set("Zone", $zone); - } - /** * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * diff --git a/src/UVMS/UVMSClient.php b/src/UVMS/UVMSClient.php index 88f58527..0422b82a 100644 --- a/src/UVMS/UVMSClient.php +++ b/src/UVMS/UVMSClient.php @@ -35,8 +35,6 @@ class UVMSClient extends Client * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "CalledNumber" => (string) 被叫号码,采用 E.164 标准,格式为+[国家代码][用户号码]。例如:+8613512345678, 其中前面有一个+号 ,86为国家码,13512345678为手机号 * "TemplateId" => (string) 模板 ID,在控制台审核通过的模板 ID。 diff --git a/src/VPC/Apis/AllocateBatchSecondaryIpRequest.php b/src/VPC/Apis/AllocateBatchSecondaryIpRequest.php new file mode 100644 index 00000000..3a8c36a9 --- /dev/null +++ b/src/VPC/Apis/AllocateBatchSecondaryIpRequest.php @@ -0,0 +1,214 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Apis; + +use UCloud\Core\Request\Request; + +class AllocateBatchSecondaryIpRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "AllocateBatchSecondaryIp"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("Mac"); + $this->markRequired("ObjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Mac: 节点mac + * + * @return string|null + */ + public function getMac() + { + return $this->get("Mac"); + } + + /** + * Mac: 节点mac + * + * @param string $mac + */ + public function setMac($mac) + { + $this->set("Mac", $mac); + } + + /** + * ObjectId: 资源Id + * + * @return string|null + */ + public function getObjectId() + { + return $this->get("ObjectId"); + } + + /** + * ObjectId: 资源Id + * + * @param string $objectId + */ + public function setObjectId($objectId) + { + $this->set("ObjectId", $objectId); + } + + /** + * SubnetId: 子网Id(若未指定,则根据zone获取默认子网进行创建) + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id(若未指定,则根据zone获取默认子网进行创建) + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: vpcId + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpcId + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Ip: 【arry】支持按如下方式申请:①按网段:如192.168.1.32/27,掩码数字最小为27 ②指定IP地址,如192.168.1.3 + * + * @return string[]|null + */ + public function getIp() + { + return $this->get("Ip"); + } + + /** + * Ip: 【arry】支持按如下方式申请:①按网段:如192.168.1.32/27,掩码数字最小为27 ②指定IP地址,如192.168.1.3 + * + * @param string[] $ip + */ + public function setIp(array $ip) + { + $this->set("Ip", $ip); + } + + /** + * Count: 申请的内网IP数量 + * + * @return integer|null + */ + public function getCount() + { + return $this->get("Count"); + } + + /** + * Count: 申请的内网IP数量 + * + * @param int $count + */ + public function setCount($count) + { + $this->set("Count", $count); + } +} diff --git a/src/VPC/Apis/AllocateBatchSecondaryIpResponse.php b/src/VPC/Apis/AllocateBatchSecondaryIpResponse.php new file mode 100644 index 00000000..a6f34ca4 --- /dev/null +++ b/src/VPC/Apis/AllocateBatchSecondaryIpResponse.php @@ -0,0 +1,58 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Apis; + +use UCloud\Core\Response\Response; +use UCloud\VPC\Models\IpsInfo; +use UCloud\VPC\Models\StatusInfo; + +class AllocateBatchSecondaryIpResponse extends Response +{ + + + /** + * IpsInfo: 详见IpsInfo + * + * @return IpsInfo[]|null + */ + public function getIpsInfo() + { + $items = $this->get("IpsInfo"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IpsInfo($item)); + } + return $result; + } + + /** + * IpsInfo: 详见IpsInfo + * + * @param IpsInfo[] $ipsInfo + */ + public function setIpsInfo(array $ipsInfo) + { + $result = []; + foreach ($ipsInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/CreateNetworkInterfaceRequest.php b/src/VPC/Apis/CreateNetworkInterfaceRequest.php new file mode 100644 index 00000000..be491833 --- /dev/null +++ b/src/VPC/Apis/CreateNetworkInterfaceRequest.php @@ -0,0 +1,213 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Apis; + +use UCloud\Core\Request\Request; + +class CreateNetworkInterfaceRequest extends Request +{ + public function __construct() + { + parent::__construct(["Action" => "CreateNetworkInterface"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 所属VPCID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPCID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 所属子网ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所属子网ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Name: 虚拟网卡名称,默认为 NetworkInterface + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 虚拟网卡名称,默认为 NetworkInterface + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * PrivateIp: 指定内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @return string[]|null + */ + public function getPrivateIp() + { + return $this->get("PrivateIp"); + } + + /** + * PrivateIp: 指定内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @param string[] $privateIp + */ + public function setPrivateIp(array $privateIp) + { + $this->set("PrivateIp", $privateIp); + } + + /** + * SecurityGroupId: 防火墙GroupId,默认:Web推荐防火墙 可由DescribeSecurityGroupResponse中的GroupId取得 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙GroupId,默认:Web推荐防火墙 可由DescribeSecurityGroupResponse中的GroupId取得 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/VPC/Apis/CreateNetworkInterfaceResponse.php b/src/VPC/Apis/CreateNetworkInterfaceResponse.php new file mode 100644 index 00000000..d97054ef --- /dev/null +++ b/src/VPC/Apis/CreateNetworkInterfaceResponse.php @@ -0,0 +1,45 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Apis; + +use UCloud\Core\Response\Response; +use UCloud\VPC\Models\NetworkInterfaceInfo; + +class CreateNetworkInterfaceResponse extends Response +{ + + + /** + * NetworkInterface: 若创建成功,则返回虚拟网卡信息。创建失败,无此参数 + * + * @return NetworkInterfaceInfo|null + */ + public function getNetworkInterface() + { + return new NetworkInterfaceInfo($this->get("NetworkInterface")); + } + + /** + * NetworkInterface: 若创建成功,则返回虚拟网卡信息。创建失败,无此参数 + * + * @param NetworkInterfaceInfo $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $this->set("NetworkInterface", $networkInterface->getAll()); + } +} diff --git a/src/VPC/Apis/DescribeInstanceNetworkInterfaceResponse.php b/src/VPC/Apis/DescribeInstanceNetworkInterfaceResponse.php index 8fbc5b93..8d6fdb79 100644 --- a/src/VPC/Apis/DescribeInstanceNetworkInterfaceResponse.php +++ b/src/VPC/Apis/DescribeInstanceNetworkInterfaceResponse.php @@ -17,7 +17,7 @@ namespace UCloud\VPC\Apis; use UCloud\Core\Response\Response; -use UCloud\VPC\Models\NetworkInterface; +use UCloud\VPC\Models\InstanceNetworkInterface; class DescribeInstanceNetworkInterfaceResponse extends Response { @@ -26,7 +26,7 @@ class DescribeInstanceNetworkInterfaceResponse extends Response /** * NetworkInterfaceSet: 虚拟网卡信息 * - * @return NetworkInterface[]|null + * @return InstanceNetworkInterface[]|null */ public function getNetworkInterfaceSet() { @@ -36,7 +36,7 @@ public function getNetworkInterfaceSet() } $result = []; foreach ($items as $i => $item) { - array_push($result, new NetworkInterface($item)); + array_push($result, new InstanceNetworkInterface($item)); } return $result; } @@ -44,7 +44,7 @@ public function getNetworkInterfaceSet() /** * NetworkInterfaceSet: 虚拟网卡信息 * - * @param NetworkInterface[] $networkInterfaceSet + * @param InstanceNetworkInterface[] $networkInterfaceSet */ public function setNetworkInterfaceSet(array $networkInterfaceSet) { diff --git a/src/VPC/Apis/DescribeNetworkInterfaceResponse.php b/src/VPC/Apis/DescribeNetworkInterfaceResponse.php index ab99edbc..257d49ec 100644 --- a/src/VPC/Apis/DescribeNetworkInterfaceResponse.php +++ b/src/VPC/Apis/DescribeNetworkInterfaceResponse.php @@ -18,6 +18,8 @@ use UCloud\Core\Response\Response; use UCloud\VPC\Models\NetworkInterface; +use UCloud\VPC\Models\UNIIpInfo; +use UCloud\VPC\Models\UNIQuotaInfo; class DescribeNetworkInterfaceResponse extends Response { diff --git a/src/VPC/Apis/DescribeRouteTableRequest.php b/src/VPC/Apis/DescribeRouteTableRequest.php index 0e1dc5b6..0f5b850b 100644 --- a/src/VPC/Apis/DescribeRouteTableRequest.php +++ b/src/VPC/Apis/DescribeRouteTableRequest.php @@ -29,7 +29,7 @@ public function __construct() /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -39,7 +39,7 @@ public function getRegion() } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $region */ @@ -49,7 +49,7 @@ public function setRegion($region) } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @return string|null */ @@ -59,7 +59,7 @@ public function getProjectId() } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @param string $projectId */ @@ -167,4 +167,44 @@ public function setBusinessId($businessId) { $this->set("BusinessId", $businessId); } + + /** + * Brief: 默认为 false, 返回详细路由规则信息 + * + * @return boolean|null + */ + public function getBrief() + { + return $this->get("Brief"); + } + + /** + * Brief: 默认为 false, 返回详细路由规则信息 + * + * @param boolean $brief + */ + public function setBrief($brief) + { + $this->set("Brief", $brief); + } + + /** + * LongId: 默认为 false, 表示路由表是短 ID + * + * @return string|null + */ + public function getLongId() + { + return $this->get("LongId"); + } + + /** + * LongId: 默认为 false, 表示路由表是短 ID + * + * @param string $longId + */ + public function setLongId($longId) + { + $this->set("LongId", $longId); + } } diff --git a/src/VPC/Models/InstanceNetworkInterface.php b/src/VPC/Models/InstanceNetworkInterface.php new file mode 100644 index 00000000..ba8e3e28 --- /dev/null +++ b/src/VPC/Models/InstanceNetworkInterface.php @@ -0,0 +1,344 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class InstanceNetworkInterface extends Response +{ + + + /** + * InterfaceId: 虚拟网卡资源ID + * + * @return string|null + */ + public function getInterfaceId() + { + return $this->get("InterfaceId"); + } + + /** + * InterfaceId: 虚拟网卡资源ID + * + * @param string $interfaceId + */ + public function setInterfaceId($interfaceId) + { + $this->set("InterfaceId", $interfaceId); + } + + /** + * VPCId: 所属VPC + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPC + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 所属子网 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所属子网 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * PrivateIpSet: 关联内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @return string[]|null + */ + public function getPrivateIpSet() + { + return $this->get("PrivateIpSet"); + } + + /** + * PrivateIpSet: 关联内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @param string[] $privateIpSet + */ + public function setPrivateIpSet(array $privateIpSet) + { + $this->set("PrivateIpSet", $privateIpSet); + } + + /** + * MacAddress: 关联Mac + * + * @return string|null + */ + public function getMacAddress() + { + return $this->get("MacAddress"); + } + + /** + * MacAddress: 关联Mac + * + * @param string $macAddress + */ + public function setMacAddress($macAddress) + { + $this->set("MacAddress", $macAddress); + } + + /** + * Status: 绑定状态 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 绑定状态 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * Name: 虚拟网卡名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 虚拟网卡名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Netmask: 内网IP掩码 + * + * @return string|null + */ + public function getNetmask() + { + return $this->get("Netmask"); + } + + /** + * Netmask: 内网IP掩码 + * + * @param string $netmask + */ + public function setNetmask($netmask) + { + $this->set("Netmask", $netmask); + } + + /** + * Gateway: 默认网关 + * + * @return string|null + */ + public function getGateway() + { + return $this->get("Gateway"); + } + + /** + * Gateway: 默认网关 + * + * @param string $gateway + */ + public function setGateway($gateway) + { + $this->set("Gateway", $gateway); + } + + /** + * AttachInstanceId: 绑定实例资源ID + * + * @return string|null + */ + public function getAttachInstanceId() + { + return $this->get("AttachInstanceId"); + } + + /** + * AttachInstanceId: 绑定实例资源ID + * + * @param string $attachInstanceId + */ + public function setAttachInstanceId($attachInstanceId) + { + $this->set("AttachInstanceId", $attachInstanceId); + } + + /** + * Default: 是否是绑定实例的默认网卡 false:不是 true:是 + * + * @return boolean|null + */ + public function getDefault() + { + return $this->get("Default"); + } + + /** + * Default: 是否是绑定实例的默认网卡 false:不是 true:是 + * + * @param boolean $default + */ + public function setDefault($default) + { + $this->set("Default", $default); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * EIPIdSet: 虚拟网卡绑定的EIP ID信息 + * + * @return string[]|null + */ + public function getEIPIdSet() + { + return $this->get("EIPIdSet"); + } + + /** + * EIPIdSet: 虚拟网卡绑定的EIP ID信息 + * + * @param string[] $eipIdSet + */ + public function setEIPIdSet(array $eipIdSet) + { + $this->set("EIPIdSet", $eipIdSet); + } + + /** + * FirewallIdSet: 虚拟网卡绑定的防火墙ID信息 + * + * @return string[]|null + */ + public function getFirewallIdSet() + { + return $this->get("FirewallIdSet"); + } + + /** + * FirewallIdSet: 虚拟网卡绑定的防火墙ID信息 + * + * @param string[] $firewallIdSet + */ + public function setFirewallIdSet(array $firewallIdSet) + { + $this->set("FirewallIdSet", $firewallIdSet); + } +} diff --git a/src/VPC/Models/IpsInfo.php b/src/VPC/Models/IpsInfo.php new file mode 100644 index 00000000..69318e0d --- /dev/null +++ b/src/VPC/Models/IpsInfo.php @@ -0,0 +1,164 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class IpsInfo extends Response +{ + + + /** + * Ip: 内网IP地址 + * + * @return string|null + */ + public function getIp() + { + return $this->get("Ip"); + } + + /** + * Ip: 内网IP地址 + * + * @param string $ip + */ + public function setIp($ip) + { + $this->set("Ip", $ip); + } + + /** + * Mask: 掩码 + * + * @return string|null + */ + public function getMask() + { + return $this->get("Mask"); + } + + /** + * Mask: 掩码 + * + * @param string $mask + */ + public function setMask($mask) + { + $this->set("Mask", $mask); + } + + /** + * Gateway: 网关 + * + * @return string|null + */ + public function getGateway() + { + return $this->get("Gateway"); + } + + /** + * Gateway: 网关 + * + * @param string $gateway + */ + public function setGateway($gateway) + { + $this->set("Gateway", $gateway); + } + + /** + * Mac: MAC地址 + * + * @return string|null + */ + public function getMac() + { + return $this->get("Mac"); + } + + /** + * Mac: MAC地址 + * + * @param string $mac + */ + public function setMac($mac) + { + $this->set("Mac", $mac); + } + + /** + * SubnetId: 子网资源ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网资源ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC资源ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Status: IP分配结果,详见StatusInfo + * + * @return StatusInfo|null + */ + public function getStatus() + { + return new StatusInfo($this->get("Status")); + } + + /** + * Status: IP分配结果,详见StatusInfo + * + * @param StatusInfo $status + */ + public function setStatus(array $status) + { + $this->set("Status", $status->getAll()); + } +} diff --git a/src/VPC/Models/NetworkInterface.php b/src/VPC/Models/NetworkInterface.php index 4cefb567..ce4c2466 100644 --- a/src/VPC/Models/NetworkInterface.php +++ b/src/VPC/Models/NetworkInterface.php @@ -145,21 +145,33 @@ public function setStatus($status) /** * PrivateIp: 网卡的内网IP信息 * - * @return string[]|null + * @return UNIIpInfo[]|null */ public function getPrivateIp() { - return $this->get("PrivateIp"); + $items = $this->get("PrivateIp"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UNIIpInfo($item)); + } + return $result; } /** * PrivateIp: 网卡的内网IP信息 * - * @param string[] $privateIp + * @param UNIIpInfo[] $privateIp */ public function setPrivateIp(array $privateIp) { - $this->set("PrivateIp", $privateIp); + $result = []; + foreach ($privateIp as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; } /** @@ -363,22 +375,22 @@ public function setFirewallIdSet(array $firewallIdSet) } /** - * PrivateIplimit: 网卡的内网IP配额信息 + * PrivateIpLimit: 网卡的内网IP配额信息 * - * @return string[]|null + * @return UNIQuotaInfo|null */ - public function getPrivateIplimit() + public function getPrivateIpLimit() { - return $this->get("PrivateIplimit"); + return new UNIQuotaInfo($this->get("PrivateIpLimit")); } /** - * PrivateIplimit: 网卡的内网IP配额信息 + * PrivateIpLimit: 网卡的内网IP配额信息 * - * @param string[] $privateIplimit + * @param UNIQuotaInfo $privateIpLimit */ - public function setPrivateIplimit(array $privateIplimit) + public function setPrivateIpLimit(array $privateIpLimit) { - $this->set("PrivateIplimit", $privateIplimit); + $this->set("PrivateIpLimit", $privateIpLimit->getAll()); } } diff --git a/src/VPC/Models/NetworkInterfaceInfo.php b/src/VPC/Models/NetworkInterfaceInfo.php new file mode 100644 index 00000000..73586793 --- /dev/null +++ b/src/VPC/Models/NetworkInterfaceInfo.php @@ -0,0 +1,304 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class NetworkInterfaceInfo extends Response +{ + + + /** + * InterfaceId: 虚拟网卡资源ID + * + * @return string|null + */ + public function getInterfaceId() + { + return $this->get("InterfaceId"); + } + + /** + * InterfaceId: 虚拟网卡资源ID + * + * @param string $interfaceId + */ + public function setInterfaceId($interfaceId) + { + $this->set("InterfaceId", $interfaceId); + } + + /** + * VPCId: 所属VPC + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPC + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 所属子网 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所属子网 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * PrivateIpSet: 关联内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @return string[]|null + */ + public function getPrivateIpSet() + { + return $this->get("PrivateIpSet"); + } + + /** + * PrivateIpSet: 关联内网IP。当前一个网卡仅支持绑定一个内网IP + * + * @param string[] $privateIpSet + */ + public function setPrivateIpSet(array $privateIpSet) + { + $this->set("PrivateIpSet", $privateIpSet); + } + + /** + * MacAddress: 关联Mac + * + * @return string|null + */ + public function getMacAddress() + { + return $this->get("MacAddress"); + } + + /** + * MacAddress: 关联Mac + * + * @param string $macAddress + */ + public function setMacAddress($macAddress) + { + $this->set("MacAddress", $macAddress); + } + + /** + * Status: 绑定状态 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 绑定状态 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * Name: 虚拟网卡名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 虚拟网卡名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Netmask: 内网IP掩码 + * + * @return string|null + */ + public function getNetmask() + { + return $this->get("Netmask"); + } + + /** + * Netmask: 内网IP掩码 + * + * @param string $netmask + */ + public function setNetmask($netmask) + { + $this->set("Netmask", $netmask); + } + + /** + * Gateway: 默认网关 + * + * @return string|null + */ + public function getGateway() + { + return $this->get("Gateway"); + } + + /** + * Gateway: 默认网关 + * + * @param string $gateway + */ + public function setGateway($gateway) + { + $this->set("Gateway", $gateway); + } + + /** + * AttachInstanceId: 绑定实例资源ID + * + * @return string|null + */ + public function getAttachInstanceId() + { + return $this->get("AttachInstanceId"); + } + + /** + * AttachInstanceId: 绑定实例资源ID + * + * @param string $attachInstanceId + */ + public function setAttachInstanceId($attachInstanceId) + { + $this->set("AttachInstanceId", $attachInstanceId); + } + + /** + * Default: 是否是绑定实例的默认网卡 false:不是 true:是 + * + * @return boolean|null + */ + public function getDefault() + { + return $this->get("Default"); + } + + /** + * Default: 是否是绑定实例的默认网卡 false:不是 true:是 + * + * @param boolean $default + */ + public function setDefault($default) + { + $this->set("Default", $default); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Models/RouteRuleInfo.php b/src/VPC/Models/RouteRuleInfo.php index 5662235c..6dda1901 100644 --- a/src/VPC/Models/RouteRuleInfo.php +++ b/src/VPC/Models/RouteRuleInfo.php @@ -122,6 +122,26 @@ public function setNexthopType($nexthopType) $this->set("NexthopType", $nexthopType); } + /** + * InstanceType: 实例类型,枚举值:UHOST,云主机;UNI,虚拟网卡;PHOST,物理云主机 + * + * @return string|null + */ + public function getInstanceType() + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 实例类型,枚举值:UHOST,云主机;UNI,虚拟网卡;PHOST,物理云主机 + * + * @param string $instanceType + */ + public function setInstanceType($instanceType) + { + $this->set("InstanceType", $instanceType); + } + /** * OriginAddr: 保留字段,暂未使用 * diff --git a/src/VPC/Models/RouteTableInfo.php b/src/VPC/Models/RouteTableInfo.php index 9586b20b..62416fec 100644 --- a/src/VPC/Models/RouteTableInfo.php +++ b/src/VPC/Models/RouteTableInfo.php @@ -82,6 +82,26 @@ public function setSubnetCount($subnetCount) $this->set("SubnetCount", $subnetCount); } + /** + * SubnetIds: 绑定该路由表的子网 + * + * @return string[]|null + */ + public function getSubnetIds() + { + return $this->get("SubnetIds"); + } + + /** + * SubnetIds: 绑定该路由表的子网 + * + * @param string[] $subnetIds + */ + public function setSubnetIds(array $subnetIds) + { + $this->set("SubnetIds", $subnetIds); + } + /** * VPCId: 路由表所属的VPC资源ID * diff --git a/src/VPC/Models/StatusInfo.php b/src/VPC/Models/StatusInfo.php new file mode 100644 index 00000000..0df5bc95 --- /dev/null +++ b/src/VPC/Models/StatusInfo.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class StatusInfo extends Response +{ + + + /** + * StatusCode: 枚举值:Succeeded,Failed + * + * @return string|null + */ + public function getStatusCode() + { + return $this->get("StatusCode"); + } + + /** + * StatusCode: 枚举值:Succeeded,Failed + * + * @param string $statusCode + */ + public function setStatusCode($statusCode) + { + $this->set("StatusCode", $statusCode); + } + + /** + * Message: IP分配失败原因 + * + * @return string|null + */ + public function getMessage() + { + return $this->get("Message"); + } + + /** + * Message: IP分配失败原因 + * + * @param string $message + */ + public function setMessage($message) + { + $this->set("Message", $message); + } +} diff --git a/src/VPC/Models/UNIIpInfo.php b/src/VPC/Models/UNIIpInfo.php new file mode 100644 index 00000000..4e108f17 --- /dev/null +++ b/src/VPC/Models/UNIIpInfo.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class UNIIpInfo extends Response +{ + + + /** + * IpType: ip类型 SecondaryIp/PrimaryIp + * + * @return string|null + */ + public function getIpType() + { + return $this->get("IpType"); + } + + /** + * IpType: ip类型 SecondaryIp/PrimaryIp + * + * @param string $ipType + */ + public function setIpType($ipType) + { + $this->set("IpType", $ipType); + } + + /** + * IpAddr: ip 地址 + * + * @return string[]|null + */ + public function getIpAddr() + { + return $this->get("IpAddr"); + } + + /** + * IpAddr: ip 地址 + * + * @param string[] $ipAddr + */ + public function setIpAddr(array $ipAddr) + { + $this->set("IpAddr", $ipAddr); + } +} diff --git a/src/VPC/Models/UNIQuotaInfo.php b/src/VPC/Models/UNIQuotaInfo.php new file mode 100644 index 00000000..d2ff46ef --- /dev/null +++ b/src/VPC/Models/UNIQuotaInfo.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright 2022 UCloud Technology Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +namespace UCloud\VPC\Models; + +use UCloud\Core\Response\Response; + +class UNIQuotaInfo extends Response +{ + + + /** + * PrivateIpCount: 网卡拥有的内网IP数量 + * + * @return integer|null + */ + public function getPrivateIpCount() + { + return $this->get("PrivateIpCount"); + } + + /** + * PrivateIpCount: 网卡拥有的内网IP数量 + * + * @param int $privateIpCount + */ + public function setPrivateIpCount($privateIpCount) + { + $this->set("PrivateIpCount", $privateIpCount); + } + + /** + * PrivateIpQuota: 网卡内网IP配额 + * + * @return integer|null + */ + public function getPrivateIpQuota() + { + return $this->get("PrivateIpQuota"); + } + + /** + * PrivateIpQuota: 网卡内网IP配额 + * + * @param int $privateIpQuota + */ + public function setPrivateIpQuota($privateIpQuota) + { + $this->set("PrivateIpQuota", $privateIpQuota); + } +} diff --git a/src/VPC/VPCClient.php b/src/VPC/VPCClient.php index 3bcc216a..8cf520a8 100644 --- a/src/VPC/VPCClient.php +++ b/src/VPC/VPCClient.php @@ -24,6 +24,8 @@ use UCloud\VPC\Apis\AddVPCNetworkResponse; use UCloud\VPC\Apis\AddWhiteListResourceRequest; use UCloud\VPC\Apis\AddWhiteListResourceResponse; +use UCloud\VPC\Apis\AllocateBatchSecondaryIpRequest; +use UCloud\VPC\Apis\AllocateBatchSecondaryIpResponse; use UCloud\VPC\Apis\AllocateSecondaryIpRequest; use UCloud\VPC\Apis\AllocateSecondaryIpResponse; use UCloud\VPC\Apis\AllocateVIPRequest; @@ -42,6 +44,8 @@ use UCloud\VPC\Apis\CreateNetworkAclAssociationResponse; use UCloud\VPC\Apis\CreateNetworkAclEntryRequest; use UCloud\VPC\Apis\CreateNetworkAclEntryResponse; +use UCloud\VPC\Apis\CreateNetworkInterfaceRequest; +use UCloud\VPC\Apis\CreateNetworkInterfaceResponse; use UCloud\VPC\Apis\CreateRouteTableRequest; use UCloud\VPC\Apis\CreateRouteTableResponse; use UCloud\VPC\Apis\CreateSnatDnatRuleRequest; @@ -245,6 +249,53 @@ public function addWhiteListResource(AddWhiteListResourceRequest $request = null return new AddWhiteListResourceResponse($resp->toArray(), $resp->getRequestId()); } + /** + * AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/allocate_batch_secondary_ip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Mac" => (string) 节点mac + * "ObjectId" => (string) 资源Id + * "SubnetId" => (string) 子网Id(若未指定,则根据zone获取默认子网进行创建) + * "VPCId" => (string) vpcId + * "Ip" => (array<string>) 【arry】支持按如下方式申请:①按网段:如192.168.1.32/27,掩码数字最小为27 ②指定IP地址,如192.168.1.3 + * "Count" => (integer) 申请的内网IP数量 + * ] + * + * Outputs: + * + * $outputs = [ + * "IpsInfo" => (array<object>) 详见IpsInfo[ + * [ + * "Ip" => (string) 内网IP地址 + * "Mask" => (string) 掩码 + * "Gateway" => (string) 网关 + * "Mac" => (string) MAC地址 + * "SubnetId" => (string) 子网资源ID + * "VPCId" => (string) VPC资源ID + * "Status" => (object) IP分配结果,详见StatusInfo[ + * "StatusCode" => (string) 枚举值:Succeeded,Failed + * "Message" => (string) IP分配失败原因 + * ] + * ] + * ] + * ] + * + * @return AllocateBatchSecondaryIpResponse + * @throws UCloudException + */ + public function allocateBatchSecondaryIp(AllocateBatchSecondaryIpRequest $request = null) + { + $resp = $this->invoke($request); + return new AllocateBatchSecondaryIpResponse($resp->toArray(), $resp->getRequestId()); + } + /** * AllocateSecondaryIp - 分配ip(用于uk8s使用) * @@ -555,6 +606,55 @@ public function createNetworkAclEntry(CreateNetworkAclEntryRequest $request = nu return new CreateNetworkAclEntryResponse($resp->toArray(), $resp->getRequestId()); } + /** + * CreateNetworkInterface - 创建虚拟网卡 + * + * See also: https://docs.ucloud.cn/api/vpc2.0-api/create_network_interface + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) 所属VPCID + * "SubnetId" => (string) 所属子网ID + * "Name" => (string) 虚拟网卡名称,默认为 NetworkInterface + * "PrivateIp" => (array<string>) 指定内网IP。当前一个网卡仅支持绑定一个内网IP + * "SecurityGroupId" => (string) 防火墙GroupId,默认:Web推荐防火墙 可由DescribeSecurityGroupResponse中的GroupId取得 + * "Tag" => (string) 业务组 + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "NetworkInterface" => (object) 若创建成功,则返回虚拟网卡信息。创建失败,无此参数[ + * "InterfaceId" => (string) 虚拟网卡资源ID + * "VPCId" => (string) 所属VPC + * "SubnetId" => (string) 所属子网 + * "PrivateIpSet" => (array<string>) 关联内网IP。当前一个网卡仅支持绑定一个内网IP + * "MacAddress" => (string) 关联Mac + * "Status" => (integer) 绑定状态 + * "Name" => (string) 虚拟网卡名称 + * "Netmask" => (string) 内网IP掩码 + * "Gateway" => (string) 默认网关 + * "AttachInstanceId" => (string) 绑定实例资源ID + * "Default" => (boolean) 是否是绑定实例的默认网卡 false:不是 true:是 + * "CreateTime" => (integer) 创建时间 + * "Remark" => (string) 备注 + * "Tag" => (string) 业务组 + * ] + * ] + * + * @return CreateNetworkInterfaceResponse + * @throws UCloudException + */ + public function createNetworkInterface(CreateNetworkInterfaceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateNetworkInterfaceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateRouteTable - 创建路由表 * @@ -1102,7 +1202,6 @@ public function deleteWhiteListResource(DeleteWhiteListResourceRequest $request * "PrivateIpSet" => (array<string>) 关联内网IP。当前一个网卡仅支持绑定一个内网IP * "MacAddress" => (string) 关联Mac * "Status" => (integer) 绑定状态 - * "PrivateIp" => (array<string>) 网卡的内网IP信息 * "Name" => (string) 虚拟网卡名称 * "Netmask" => (string) 内网IP掩码 * "Gateway" => (string) 默认网关 @@ -1113,7 +1212,6 @@ public function deleteWhiteListResource(DeleteWhiteListResourceRequest $request * "Tag" => (string) 业务组 * "EIPIdSet" => (array<string>) 虚拟网卡绑定的EIP ID信息 * "FirewallIdSet" => (array<string>) 虚拟网卡绑定的防火墙ID信息 - * "PrivateIplimit" => (array<string>) 网卡的内网IP配额信息 * ] * ] * ] @@ -1464,7 +1562,12 @@ public function describeNetworkAclEntry(DescribeNetworkAclEntryRequest $request * "PrivateIpSet" => (array<string>) 关联内网IP。当前一个网卡仅支持绑定一个内网IP * "MacAddress" => (string) 关联Mac * "Status" => (integer) 绑定状态 - * "PrivateIp" => (array<string>) 网卡的内网IP信息 + * "PrivateIp" => (array<object>) 网卡的内网IP信息[ + * [ + * "IpType" => (string) ip类型 SecondaryIp/PrimaryIp + * "IpAddr" => (array<string>) ip 地址 + * ] + * ] * "Name" => (string) 虚拟网卡名称 * "Netmask" => (string) 内网IP掩码 * "Gateway" => (string) 默认网关 @@ -1475,7 +1578,10 @@ public function describeNetworkAclEntry(DescribeNetworkAclEntryRequest $request * "Tag" => (string) 业务组 * "EIPIdSet" => (array<string>) 虚拟网卡绑定的EIP ID信息 * "FirewallIdSet" => (array<string>) 虚拟网卡绑定的防火墙ID信息 - * "PrivateIplimit" => (array<string>) 网卡的内网IP配额信息 + * "PrivateIpLimit" => (object) 网卡的内网IP配额信息[ + * "PrivateIpCount" => (integer) 网卡拥有的内网IP数量 + * "PrivateIpQuota" => (integer) 网卡内网IP配额 + * ] * ] * ] * "TotalCount" => (integer) 虚拟网卡总数 @@ -1498,13 +1604,15 @@ public function describeNetworkInterface(DescribeNetworkInterfaceRequest $reques * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "VPCId" => (string) 所属VPC的资源ID * "RouteTableId" => (string) 路由表资源ID * "OffSet" => (integer) 数据偏移量。默认为0 * "Limit" => (integer) 数据分页值。默认为20 * "BusinessId" => (string) 业务组ID + * "Brief" => (boolean) 默认为 false, 返回详细路由规则信息 + * "LongId" => (string) 默认为 false, 表示路由表是短 ID * ] * * Outputs: @@ -1515,6 +1623,7 @@ public function describeNetworkInterface(DescribeNetworkInterfaceRequest $reques * "RouteTableId" => (string) 路由表资源ID * "RouteTableType" => (integer) 路由表类型。1为默认路由表,0为自定义路由表 * "SubnetCount" => (integer) 绑定该路由表的子网数量 + * "SubnetIds" => (array<string>) 绑定该路由表的子网 * "VPCId" => (string) 路由表所属的VPC资源ID * "VPCName" => (string) 路由表所属的VPC资源名称 * "Tag" => (string) 路由表所属业务组 @@ -1527,6 +1636,7 @@ public function describeNetworkInterface(DescribeNetworkInterfaceRequest $reques * "DstPort" => (integer) 保留字段,暂未使用 * "NexthopId" => (string) 路由下一跳资源ID * "NexthopType" => (string) 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + * "InstanceType" => (string) 实例类型,枚举值:UHOST,云主机;UNI,虚拟网卡;PHOST,物理云主机 * "OriginAddr" => (string) 保留字段,暂未使用 * "Priority" => (integer) 保留字段,暂未使用 * "Remark" => (string) 路由规则备注