Skip to content

Commit 8a08fbf

Browse files
authored
auto code generation (#9)
1 parent 9d16867 commit 8a08fbf

10 files changed

+299
-24
lines changed

src/UHost/Apis/CreateUHostInstanceRequest.php

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818

1919
use UCloud\Core\Request\Request;
2020
use UCloud\UHost\Params\CreateUHostInstanceParamDisks;
21+
use UCloud\UHost\Params\CreateUHostInstanceParamDisksCustomBackup;
2122
use UCloud\UHost\Params\CreateUHostInstanceParamNetworkInterface;
2223
use UCloud\UHost\Params\CreateUHostInstanceParamNetworkInterfaceEIP;
2324
use UCloud\UHost\Params\CreateUHostInstanceParamNetworkInterfaceIPv6;
2425
use UCloud\UHost\Params\CreateUHostInstanceParamVolumes;
2526
use UCloud\UHost\Params\CreateUHostInstanceParamFeatures;
27+
use UCloud\UHost\Params\CreateUHostInstanceParamSecGroupId;
2628

2729
class CreateUHostInstanceRequest extends Request
2830
{
@@ -370,7 +372,7 @@ public function setGPU($gpu)
370372
}
371373

372374
/**
373-
* NetCapability: 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台
375+
* NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档
374376
*
375377
* @return string|null
376378
*/
@@ -380,7 +382,7 @@ public function getNetCapability()
380382
}
381383

382384
/**
383-
* NetCapability: 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台
385+
* NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档
384386
*
385387
* @param string $netCapability
386388
*/
@@ -694,7 +696,7 @@ public function setVolumes(array $volumes)
694696
}
695697

696698
/**
697-
* KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
699+
* KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
698700
*
699701
* @return string|null
700702
*/
@@ -704,7 +706,7 @@ public function getKeyPairId()
704706
}
705707

706708
/**
707-
* KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
709+
* KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
708710
*
709711
* @param string $keyPairId
710712
*/
@@ -733,6 +735,38 @@ public function setFeatures(array $features)
733735
$this->set("Features", $features->getAll());
734736
}
735737

738+
/**
739+
* SecGroupId:
740+
*
741+
* @return CreateUHostInstanceParamSecGroupId[]|null
742+
*/
743+
public function getSecGroupId()
744+
{
745+
$items = $this->get("SecGroupId");
746+
if ($items == null) {
747+
return [];
748+
}
749+
$result = [];
750+
foreach ($items as $i => $item) {
751+
array_push($result, new CreateUHostInstanceParamSecGroupId($item));
752+
}
753+
return $result;
754+
}
755+
756+
/**
757+
* SecGroupId:
758+
*
759+
* @param CreateUHostInstanceParamSecGroupId[] $secGroupId
760+
*/
761+
public function setSecGroupId(array $secGroupId)
762+
{
763+
$result = [];
764+
foreach ($secGroupId as $i => $item) {
765+
array_push($result, $item->getAll());
766+
}
767+
return $result;
768+
}
769+
736770
/**
737771
* CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
738772
*

src/UHost/Params/CreateUHostInstanceParamDisks.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function setType($type)
6363
}
6464

6565
/**
66-
* Size: 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。
66+
* Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。
6767
*
6868
* @return integer|null
6969
*/
@@ -73,7 +73,7 @@ public function getSize()
7373
}
7474

7575
/**
76-
* Size: 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。
76+
* Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。
7777
*
7878
* @param int $size
7979
*/
@@ -161,4 +161,24 @@ public function setCouponId($couponId)
161161
{
162162
$this->set("CouponId", $couponId);
163163
}
164+
165+
/**
166+
* CustomBackup:
167+
*
168+
* @return CreateUHostInstanceParamDisksCustomBackup|null
169+
*/
170+
public function getCustomBackup()
171+
{
172+
return new CreateUHostInstanceParamDisksCustomBackup($this->get("CustomBackup"));
173+
}
174+
175+
/**
176+
* CustomBackup:
177+
*
178+
* @param CreateUHostInstanceParamDisksCustomBackup $customBackup
179+
*/
180+
public function setCustomBackup(array $customBackup)
181+
{
182+
$this->set("CustomBackup", $customBackup->getAll());
183+
}
164184
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright 2022 UCloud Technology Co., Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
namespace UCloud\UHost\Params;
18+
19+
use UCloud\Core\Request\Request;
20+
21+
class CreateUHostInstanceParamDisksCustomBackup extends Request
22+
{
23+
24+
25+
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright 2022 UCloud Technology Co., Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
namespace UCloud\UHost\Params;
18+
19+
use UCloud\Core\Request\Request;
20+
21+
class CreateUHostInstanceParamSecGroupId extends Request
22+
{
23+
24+
25+
26+
}

src/UHost/UHostClient.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ public function createIsolationGroup(CreateIsolationGroupRequest $request = null
204204
* [
205205
* "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。
206206
* "Type" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。
207-
* "Size" => (integer) 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。
207+
* "Size" => (integer) 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。
208208
* "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE
209209
* "Encrypted" => (boolean) 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false
210210
* "KmsKeyId" => (string) 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。
211211
* "CouponId" => (string) 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看
212+
* "CustomBackup" => (object)
212213
* ]
213214
* ]
214215
* "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。
@@ -222,7 +223,7 @@ public function createIsolationGroup(CreateIsolationGroupRequest $request = null
222223
* "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
223224
* "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"],MachineType为G时必填
224225
* "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
225-
* "NetCapability" => (string) 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台
226+
* "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档
226227
* "HotplugFeature" => (boolean) 热升级特性。True为开启,False为未开启,默认False。
227228
* "VPCId" => (string) VPC ID。默认为当前地域的默认VPC。
228229
* "SubnetId" => (string) 子网 ID。默认为当前地域的默认子网。
@@ -249,10 +250,11 @@ public function createIsolationGroup(CreateIsolationGroupRequest $request = null
249250
* "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码
250251
* "AutoDataDiskInit" => (string) 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。
251252
* "Volumes" => (array<object>)
252-
* "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
253+
* "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须
253254
* "Features" => (object) [
254255
* "UNI" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启,仅与 NetCapability Normal 兼容。
255256
* ]
257+
* "SecGroupId" => (array<object>)
256258
* "CouponId" => (string) 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
257259
* ]
258260
*

src/UPhone/Apis/CreateUPhoneServerRequest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function setName($name)
7474
}
7575

7676
/**
77-
* ServerModelName: 云手机服务器规格名称,不超过64个字节。可通过[查询云手机服务器规格列表]()查询支持的云手机服务器规格。
77+
* ServerModelName: 云手机服务器规格名称,不超过64个字节。可通过[查询云手机服务器规格列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_server_model)查询支持的云手机服务器规格。
7878
*
7979
* @return string|null
8080
*/
@@ -84,7 +84,7 @@ public function getServerModelName()
8484
}
8585

8686
/**
87-
* ServerModelName: 云手机服务器规格名称,不超过64个字节。可通过[查询云手机服务器规格列表]()查询支持的云手机服务器规格。
87+
* ServerModelName: 云手机服务器规格名称,不超过64个字节。可通过[查询云手机服务器规格列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_server_model)查询支持的云手机服务器规格。
8888
*
8989
* @param string $serverModelName
9090
*/
@@ -94,7 +94,7 @@ public function setServerModelName($serverModelName)
9494
}
9595

9696
/**
97-
* UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表]()查询支持的云手机规格。
97+
* UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_model)查询支持的云手机规格。
9898
*
9999
* @return string|null
100100
*/
@@ -104,7 +104,7 @@ public function getUPhoneModelName()
104104
}
105105

106106
/**
107-
* UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表]()查询支持的云手机规格。
107+
* UPhoneModelName: 云手机规格名称,不超过64个字节。可通过[查询云手机规格列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_model)查询支持的云手机规格。
108108
*
109109
* @param string $uPhoneModelName
110110
*/
@@ -114,7 +114,7 @@ public function setUPhoneModelName($uPhoneModelName)
114114
}
115115

116116
/**
117-
* ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像]()查询云手机规格对应的镜像ID。
117+
* ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_image)查询云手机规格对应的镜像ID。
118118
*
119119
* @return string|null
120120
*/
@@ -124,7 +124,7 @@ public function getImageId()
124124
}
125125

126126
/**
127-
* ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像]()查询云手机规格对应的镜像ID。
127+
* ImageId: 云手机镜像ID,不超过32个字节。可通过[查询手机镜像](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_image)查询云手机规格对应的镜像ID。
128128
*
129129
* @param string $imageId
130130
*/
@@ -134,7 +134,7 @@ public function setImageId($imageId)
134134
}
135135

136136
/**
137-
* CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取
137+
* CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取
138138
*
139139
* @return string|null
140140
*/
@@ -144,7 +144,7 @@ public function getCityId()
144144
}
145145

146146
/**
147-
* CityId: 城市Id,通过[获取城市列表](#DescribeUPhoneCities)获取
147+
* CityId: 城市Id,通过[获取城市列表](https://docs.ucloud.cn/api/uphone-api/describe_u_phone_cities)获取
148148
*
149149
* @param string $cityId
150150
*/

src/UPhone/Apis/DescribeUPhoneRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function setOffset($offset)
129129
}
130130

131131
/**
132-
* Limit: 返回数据长度,默认为20,最大100
132+
* Limit: 返回数据长度,默认为200,最大200
133133
*
134134
* @return integer|null
135135
*/
@@ -139,7 +139,7 @@ public function getLimit()
139139
}
140140

141141
/**
142-
* Limit: 返回数据长度,默认为20,最大100
142+
* Limit: 返回数据长度,默认为200,最大200
143143
*
144144
* @param int $limit
145145
*/

0 commit comments

Comments
 (0)