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.22
0.3.23
94 changes: 94 additions & 0 deletions src/UGN/Apis/AddRoutePolicyRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?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\UGN\Apis;

use UCloud\Core\Request\Request;
use UCloud\UGN\Params\AddRoutePolicyParamPolicy;
use UCloud\UGN\Params\AddRoutePolicyParamPolicySrcNetworks;
use UCloud\UGN\Params\AddRoutePolicyParamPolicyDstNetworks;

class AddRoutePolicyRequest extends Request
{
public function __construct()
{
parent::__construct(["Action" => "AddRoutePolicy"]);
$this->markRequired("ProjectId");
$this->markRequired("UGNID");
}



/**
* 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);
}

/**
* UGNID: 云联网实例ID
*
* @return string|null
*/
public function getUGNID()
{
return $this->get("UGNID");
}

/**
* UGNID: 云联网实例ID
*
* @param string $ugnid
*/
public function setUGNID($ugnid)
{
$this->set("UGNID", $ugnid);
}

/**
* Policy:
*
* @return AddRoutePolicyParamPolicy|null
*/
public function getPolicy()
{
return new AddRoutePolicyParamPolicy($this->get("Policy"));
}

/**
* Policy:
*
* @param AddRoutePolicyParamPolicy $policy
*/
public function setPolicy(array $policy)
{
$this->set("Policy", $policy->getAll());
}
}
26 changes: 26 additions & 0 deletions src/UGN/Apis/AddRoutePolicyResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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\UGN\Apis;

use UCloud\Core\Response\Response;

class AddRoutePolicyResponse extends Response
{



}
104 changes: 104 additions & 0 deletions src/UGN/Apis/AttachUGNNetworksRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?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\UGN\Apis;

use UCloud\Core\Request\Request;
use UCloud\UGN\Params\AttachUGNNetworksParamNetworks;

class AttachUGNNetworksRequest extends Request
{
public function __construct()
{
parent::__construct(["Action" => "AttachUGNNetworks"]);
$this->markRequired("ProjectId");
$this->markRequired("UGNID");
}



/**
* 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);
}

/**
* UGNID: UGN ID
*
* @return string|null
*/
public function getUGNID()
{
return $this->get("UGNID");
}

/**
* UGNID: UGN ID
*
* @param string $ugnid
*/
public function setUGNID($ugnid)
{
$this->set("UGNID", $ugnid);
}

/**
* Networks:
*
* @return AttachUGNNetworksParamNetworks[]|null
*/
public function getNetworks()
{
$items = $this->get("Networks");
if ($items == null) {
return [];
}
$result = [];
foreach ($items as $i => $item) {
array_push($result, new AttachUGNNetworksParamNetworks($item));
}
return $result;
}

/**
* Networks:
*
* @param AttachUGNNetworksParamNetworks[] $networks
*/
public function setNetworks(array $networks)
{
$result = [];
foreach ($networks as $i => $item) {
array_push($result, $item->getAll());
}
return $result;
}
}
77 changes: 77 additions & 0 deletions src/UGN/Apis/AttachUGNNetworksResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?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\UGN\Apis;

use UCloud\Core\Response\Response;
use UCloud\UGN\Models\Network;

class AttachUGNNetworksResponse extends Response
{


/**
* Networks: 数组,数组内每个元素的字段如下: NetworkID:string,网络实例 ID,如 uvnet-xxxx; Type:string,网络实例类型,枚举值:VPC/UCVR/...; Region:string,网络实例所属地域,如 cn-sh2; OrgName:string,网络实例所属项目名,如 org-xxx
*
* @return Network[]|null
*/
public function getNetworks()
{
$items = $this->get("Networks");
if ($items == null) {
return [];
}
$result = [];
foreach ($items as $i => $item) {
array_push($result, new Network($item));
}
return $result;
}

/**
* Networks: 数组,数组内每个元素的字段如下: NetworkID:string,网络实例 ID,如 uvnet-xxxx; Type:string,网络实例类型,枚举值:VPC/UCVR/...; Region:string,网络实例所属地域,如 cn-sh2; OrgName:string,网络实例所属项目名,如 org-xxx
*
* @param Network[] $networks
*/
public function setNetworks(array $networks)
{
$result = [];
foreach ($networks as $i => $item) {
array_push($result, $item->getAll());
}
return $result;
}

/**
* UGNID: UGN ID
*
* @return string|null
*/
public function getUGNID()
{
return $this->get("UGNID");
}

/**
* UGNID: UGN ID
*
* @param string $ugnid
*/
public function setUGNID($ugnid)
{
$this->set("UGNID", $ugnid);
}
}
Loading
Loading