Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto code generation #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/UHost/Models/AvailableInstanceTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/**
Expand Down
10 changes: 4 additions & 6 deletions src/UHost/UHostClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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。[
* [
Expand Down
20 changes: 20 additions & 0 deletions src/UNet/Apis/BindEIPRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
4 changes: 2 additions & 2 deletions src/UNet/Models/UnetEIPAddrSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UnetEIPAddrSet extends Response


/**
* OperatorName: 运营商信息如: 国际: International, BGP: BGP
* OperatorName: 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp
*
* @return string|null
*/
Expand All @@ -33,7 +33,7 @@ public function getOperatorName()
}

/**
* OperatorName: 运营商信息如: 国际: International, BGP: BGP
* OperatorName: 运营商信息如: 电信: Telecom, 联通: Unicom, 国际: International, Duplet: 双线IP(电信+联通), BGP: Bgp
*
* @param string $operatorName
*/
Expand Down
5 changes: 3 additions & 2 deletions src/UNet/UNetClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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地址
* ]
* ]
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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地址
* ]
* ]
Expand Down
20 changes: 20 additions & 0 deletions src/UPhone/Apis/CreateUPhoneAppRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
20 changes: 20 additions & 0 deletions src/UPhone/Apis/CreateUPhoneAppVersionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
24 changes: 22 additions & 2 deletions src/UPhone/Apis/CreateUPhoneImageRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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);
}
}
20 changes: 20 additions & 0 deletions src/UPhone/Apis/CreateUPhoneImageResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Loading