Skip to content
Merged
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.51
0.3.52
1 change: 1 addition & 0 deletions src/Sandbox/Apis/GetSandboxSiteResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Sandbox/Apis/ListSandboxSitesResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/Sandbox/Models/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
*
Expand Down
64 changes: 64 additions & 0 deletions src/Sandbox/Models/SiteResource.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* Copyright 2026 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\Sandbox\Models;

use UCloud\Core\Response\Response;

class SiteResource extends Response
{


/**
* CPU: CPU核心
*
* @return integer|null
*/
public function getCPU()
{
return $this->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);
}
}
8 changes: 8 additions & 0 deletions src/Sandbox/SandboxClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>) 站点环境变量。格式:["key=value"]
* "CustomDomain" => (string) 自定义域名
* "CustomDomainStatus" => (string) 自定义域名签发状态
Expand Down Expand Up @@ -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<string>) 站点环境变量。格式:["key=value"]
* "CustomDomain" => (string) 自定义域名
* "CustomDomainStatus" => (string) 自定义域名签发状态
Expand Down
20 changes: 4 additions & 16 deletions src/VPC/Models/NetworkInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
8 changes: 3 additions & 5 deletions src/VPC/VPCClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2123,11 +2123,9 @@ public function describeNetworkAclEntry(DescribeNetworkAclEntryRequest $request
* "CreateTime" => (integer) 创建时间
* "Remark" => (string) 备注
* "Tag" => (string) 业务组
* "PrivateIpLimit" => (array<object>) 私有 IP 配额[
* [
* "PrivateIpCount" => (integer) 网卡拥有的内网IP数量
* "PrivateIpQuota" => (integer) 网卡内网IP配额
* ]
* "PrivateIpLimit" => (object) 私有 IP 配额[
* "PrivateIpCount" => (integer) 网卡拥有的内网IP数量
* "PrivateIpQuota" => (integer) 网卡内网IP配额
* ]
* ]
* ]
Expand Down