From 754e4dc2ee56aa152ae7ecc9e36cba9baed40627 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Tue, 15 Sep 2026 10:04:01 +0000 Subject: [PATCH] sdk: rolling update for 0.3.52 --- VERSION | 2 +- src/Sandbox/Apis/GetSandboxSiteResponse.php | 1 + src/Sandbox/Apis/ListSandboxSitesResponse.php | 1 + src/Sandbox/Models/Site.php | 20 ++++++ src/Sandbox/Models/SiteResource.php | 64 +++++++++++++++++++ src/Sandbox/SandboxClient.php | 8 +++ src/VPC/Models/NetworkInterface.php | 20 ++---- src/VPC/VPCClient.php | 8 +-- 8 files changed, 102 insertions(+), 22 deletions(-) create mode 100644 src/Sandbox/Models/SiteResource.php diff --git a/VERSION b/VERSION index 6b9aa4e6..d57e08b5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.51 +0.3.52 diff --git a/src/Sandbox/Apis/GetSandboxSiteResponse.php b/src/Sandbox/Apis/GetSandboxSiteResponse.php index 27f7fc6e..a80631cb 100644 --- a/src/Sandbox/Apis/GetSandboxSiteResponse.php +++ b/src/Sandbox/Apis/GetSandboxSiteResponse.php @@ -18,6 +18,7 @@ use UCloud\Core\Response\Response; use UCloud\Sandbox\Models\Site; +use UCloud\Sandbox\Models\SiteResource; use UCloud\Sandbox\Models\SiteIPAccess; class GetSandboxSiteResponse extends Response diff --git a/src/Sandbox/Apis/ListSandboxSitesResponse.php b/src/Sandbox/Apis/ListSandboxSitesResponse.php index a13e3701..b3ab0dde 100644 --- a/src/Sandbox/Apis/ListSandboxSitesResponse.php +++ b/src/Sandbox/Apis/ListSandboxSitesResponse.php @@ -18,6 +18,7 @@ use UCloud\Core\Response\Response; use UCloud\Sandbox\Models\Site; +use UCloud\Sandbox\Models\SiteResource; use UCloud\Sandbox\Models\SiteIPAccess; class ListSandboxSitesResponse extends Response diff --git a/src/Sandbox/Models/Site.php b/src/Sandbox/Models/Site.php index c02a51d0..443d2e9f 100644 --- a/src/Sandbox/Models/Site.php +++ b/src/Sandbox/Models/Site.php @@ -202,6 +202,26 @@ public function setConnectKey($connectKey) $this->set("ConnectKey", $connectKey); } + /** + * Resource: 计算资源 + * + * @return SiteResource|null + */ + public function getResource() + { + return new SiteResource($this->get("Resource")); + } + + /** + * Resource: 计算资源 + * + * @param SiteResource $resource + */ + public function setResource(array $resource) + { + $this->set("Resource", $resource->getAll()); + } + /** * Envs: 站点环境变量。格式:["key=value"] * diff --git a/src/Sandbox/Models/SiteResource.php b/src/Sandbox/Models/SiteResource.php new file mode 100644 index 00000000..bd392084 --- /dev/null +++ b/src/Sandbox/Models/SiteResource.php @@ -0,0 +1,64 @@ +get("CPU"); + } + + /** + * CPU: CPU核心 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * MemoryMB: 内存占用MB + * + * @return integer|null + */ + public function getMemoryMB() + { + return $this->get("MemoryMB"); + } + + /** + * MemoryMB: 内存占用MB + * + * @param int $memoryMB + */ + public function setMemoryMB($memoryMB) + { + $this->set("MemoryMB", $memoryMB); + } +} diff --git a/src/Sandbox/SandboxClient.php b/src/Sandbox/SandboxClient.php index 1eec4227..63a21800 100644 --- a/src/Sandbox/SandboxClient.php +++ b/src/Sandbox/SandboxClient.php @@ -158,6 +158,10 @@ public function deleteSandboxSite(DeleteSandboxSiteRequest $request = null) * "UpdateTime" => (integer) 更新时间 * "AccessCode" => (string) 访问码 * "ConnectKey" => (string) 连接密钥 + * "Resource" => (object) 计算资源[ + * "CPU" => (integer) CPU核心 + * "MemoryMB" => (integer) 内存占用MB + * ] * "Envs" => (array) 站点环境变量。格式:["key=value"] * "CustomDomain" => (string) 自定义域名 * "CustomDomainStatus" => (string) 自定义域名签发状态 @@ -205,6 +209,10 @@ public function getSandboxSite(GetSandboxSiteRequest $request = null) * "UpdateTime" => (integer) 更新时间 * "AccessCode" => (string) 访问码 * "ConnectKey" => (string) 连接密钥 + * "Resource" => (object) 计算资源[ + * "CPU" => (integer) CPU核心 + * "MemoryMB" => (integer) 内存占用MB + * ] * "Envs" => (array) 站点环境变量。格式:["key=value"] * "CustomDomain" => (string) 自定义域名 * "CustomDomainStatus" => (string) 自定义域名签发状态 diff --git a/src/VPC/Models/NetworkInterface.php b/src/VPC/Models/NetworkInterface.php index de47f925..3204401e 100644 --- a/src/VPC/Models/NetworkInterface.php +++ b/src/VPC/Models/NetworkInterface.php @@ -613,32 +613,20 @@ public function setTag($tag) /** * PrivateIpLimit: 私有 IP 配额 * - * @return UNIQuotaInfo[]|null + * @return UNIQuotaInfo|null */ public function getPrivateIpLimit() { - $items = $this->get("PrivateIpLimit"); - if ($items == null) { - return []; - } - $result = []; - foreach ($items as $i => $item) { - array_push($result, new UNIQuotaInfo($item)); - } - return $result; + return new UNIQuotaInfo($this->get("PrivateIpLimit")); } /** * PrivateIpLimit: 私有 IP 配额 * - * @param UNIQuotaInfo[] $privateIpLimit + * @param UNIQuotaInfo $privateIpLimit */ public function setPrivateIpLimit(array $privateIpLimit) { - $result = []; - foreach ($privateIpLimit as $i => $item) { - array_push($result, $item->getAll()); - } - return $result; + $this->set("PrivateIpLimit", $privateIpLimit->getAll()); } } diff --git a/src/VPC/VPCClient.php b/src/VPC/VPCClient.php index 04d33072..e6c18fd7 100644 --- a/src/VPC/VPCClient.php +++ b/src/VPC/VPCClient.php @@ -2123,11 +2123,9 @@ public function describeNetworkAclEntry(DescribeNetworkAclEntryRequest $request * "CreateTime" => (integer) 创建时间 * "Remark" => (string) 备注 * "Tag" => (string) 业务组 - * "PrivateIpLimit" => (array) 私有 IP 配额[ - * [ - * "PrivateIpCount" => (integer) 网卡拥有的内网IP数量 - * "PrivateIpQuota" => (integer) 网卡内网IP配额 - * ] + * "PrivateIpLimit" => (object) 私有 IP 配额[ + * "PrivateIpCount" => (integer) 网卡拥有的内网IP数量 + * "PrivateIpQuota" => (integer) 网卡内网IP配额 * ] * ] * ]