From b95fcb270a97577ea75f0989514452c22ab0f005 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Wed, 15 Jul 2026 06:45:55 +0000 Subject: [PATCH] sdk: rolling update for 0.3.23 --- VERSION | 2 +- src/UGN/Apis/AddRoutePolicyRequest.php | 94 +++ src/UGN/Apis/AddRoutePolicyResponse.php | 26 + src/UGN/Apis/AttachUGNNetworksRequest.php | 104 +++ src/UGN/Apis/AttachUGNNetworksResponse.php | 77 ++ .../Apis/CreateSimpleUGNBwPackageRequest.php | 297 ++++++++ .../Apis/CreateSimpleUGNBwPackageResponse.php | 26 + src/UGN/Apis/CreateUGNRequest.php | 123 +++ src/UGN/Apis/CreateUGNResponse.php | 77 ++ src/UGN/Apis/DelUGNRequest.php | 71 ++ src/UGN/Apis/DelUGNResponse.php | 26 + src/UGN/Apis/DeleteRoutePolicyRequest.php | 92 +++ src/UGN/Apis/DeleteRoutePolicyResponse.php | 26 + src/UGN/Apis/DeleteUGNBwPackageRequest.php | 91 +++ src/UGN/Apis/DeleteUGNBwPackageResponse.php | 26 + src/UGN/Apis/DescribeSimpleUGNRequest.php | 3 +- src/UGN/Apis/DescribeSimpleUGNResponse.php | 53 +- src/UGN/Apis/DetachUGNNetworksRequest.php | 92 +++ src/UGN/Apis/DetachUGNNetworksResponse.php | 77 ++ src/UGN/Apis/EnableRoutePolicyRequest.php | 113 +++ src/UGN/Apis/EnableRoutePolicyResponse.php | 26 + src/UGN/Apis/GetSimpleBuyBwPriceRequest.php | 196 +++++ src/UGN/Apis/GetSimpleBuyBwPriceResponse.php | 84 +++ .../Apis/GetSimpleUGNBwPackagesRequest.php | 26 +- .../Apis/GetSimpleUGNBwPackagesResponse.php | 18 +- .../Apis/GetSwitchableBillingModesRequest.php | 71 ++ .../GetSwitchableBillingModesResponse.php | 44 ++ src/UGN/Apis/GetUGNRouteTableRequest.php | 92 +++ src/UGN/Apis/GetUGNRouteTableResponse.php | 111 +++ src/UGN/Apis/ListSimpleBwPackageRequest.php | 10 +- src/UGN/Apis/ListSimpleBwPackageResponse.php | 18 +- src/UGN/Apis/ListUGNRegionsRequest.php | 49 ++ src/UGN/Apis/ListUGNRegionsResponse.php | 57 ++ src/UGN/Apis/ListUGNRequest.php | 2 +- src/UGN/Apis/ListUGNResponse.php | 18 +- src/UGN/Apis/ModifyUGNBandwidthRequest.php | 2 +- src/UGN/Apis/ModifyUGNBandwidthResponse.php | 2 +- src/UGN/Apis/SendUGNApplyNetworkRequest.php | 217 ++++++ src/UGN/Apis/SendUGNApplyNetworkResponse.php | 26 + src/UGN/Apis/UpdateRoutePolicyRequest.php | 94 +++ src/UGN/Apis/UpdateRoutePolicyResponse.php | 26 + src/UGN/Models/Network.php | 224 ++++++ src/UGN/Models/NetworkAndPrefix.php | 64 ++ src/UGN/Models/Policy.php | 348 +++++++++ src/UGN/Models/SimpleBwPackage.php | 18 +- src/UGN/Models/SimpleNetwork.php | 2 +- src/UGN/Models/SimpleRoute.php | 142 +++- src/UGN/Models/UGN.php | 42 +- src/UGN/Models/UgnRegion.php | 124 +++ src/UGN/Models/VRoute.php | 76 ++ src/UGN/Params/AddRoutePolicyParamPolicy.php | 248 ++++++ .../AddRoutePolicyParamPolicyDstNetworks.php | 44 ++ .../AddRoutePolicyParamPolicySrcNetworks.php | 64 ++ .../Params/AttachUGNNetworksParamNetworks.php | 104 +++ src/UGN/Params/CreateUGNParamNetworks.php | 104 +++ .../Params/UpdateRoutePolicyParamPolicy.php | 268 +++++++ ...pdateRoutePolicyParamPolicyDstNetworks.php | 44 ++ ...pdateRoutePolicyParamPolicySrcNetworks.php | 64 ++ src/UGN/UGNClient.php | 712 +++++++++++++++++- 59 files changed, 5284 insertions(+), 93 deletions(-) create mode 100644 src/UGN/Apis/AddRoutePolicyRequest.php create mode 100644 src/UGN/Apis/AddRoutePolicyResponse.php create mode 100644 src/UGN/Apis/AttachUGNNetworksRequest.php create mode 100644 src/UGN/Apis/AttachUGNNetworksResponse.php create mode 100644 src/UGN/Apis/CreateSimpleUGNBwPackageRequest.php create mode 100644 src/UGN/Apis/CreateSimpleUGNBwPackageResponse.php create mode 100644 src/UGN/Apis/CreateUGNRequest.php create mode 100644 src/UGN/Apis/CreateUGNResponse.php create mode 100644 src/UGN/Apis/DelUGNRequest.php create mode 100644 src/UGN/Apis/DelUGNResponse.php create mode 100644 src/UGN/Apis/DeleteRoutePolicyRequest.php create mode 100644 src/UGN/Apis/DeleteRoutePolicyResponse.php create mode 100644 src/UGN/Apis/DeleteUGNBwPackageRequest.php create mode 100644 src/UGN/Apis/DeleteUGNBwPackageResponse.php create mode 100644 src/UGN/Apis/DetachUGNNetworksRequest.php create mode 100644 src/UGN/Apis/DetachUGNNetworksResponse.php create mode 100644 src/UGN/Apis/EnableRoutePolicyRequest.php create mode 100644 src/UGN/Apis/EnableRoutePolicyResponse.php create mode 100644 src/UGN/Apis/GetSimpleBuyBwPriceRequest.php create mode 100644 src/UGN/Apis/GetSimpleBuyBwPriceResponse.php create mode 100644 src/UGN/Apis/GetSwitchableBillingModesRequest.php create mode 100644 src/UGN/Apis/GetSwitchableBillingModesResponse.php create mode 100644 src/UGN/Apis/GetUGNRouteTableRequest.php create mode 100644 src/UGN/Apis/GetUGNRouteTableResponse.php create mode 100644 src/UGN/Apis/ListUGNRegionsRequest.php create mode 100644 src/UGN/Apis/ListUGNRegionsResponse.php create mode 100644 src/UGN/Apis/SendUGNApplyNetworkRequest.php create mode 100644 src/UGN/Apis/SendUGNApplyNetworkResponse.php create mode 100644 src/UGN/Apis/UpdateRoutePolicyRequest.php create mode 100644 src/UGN/Apis/UpdateRoutePolicyResponse.php create mode 100644 src/UGN/Models/Network.php create mode 100644 src/UGN/Models/NetworkAndPrefix.php create mode 100644 src/UGN/Models/Policy.php create mode 100644 src/UGN/Models/UgnRegion.php create mode 100644 src/UGN/Models/VRoute.php create mode 100644 src/UGN/Params/AddRoutePolicyParamPolicy.php create mode 100644 src/UGN/Params/AddRoutePolicyParamPolicyDstNetworks.php create mode 100644 src/UGN/Params/AddRoutePolicyParamPolicySrcNetworks.php create mode 100644 src/UGN/Params/AttachUGNNetworksParamNetworks.php create mode 100644 src/UGN/Params/CreateUGNParamNetworks.php create mode 100644 src/UGN/Params/UpdateRoutePolicyParamPolicy.php create mode 100644 src/UGN/Params/UpdateRoutePolicyParamPolicyDstNetworks.php create mode 100644 src/UGN/Params/UpdateRoutePolicyParamPolicySrcNetworks.php diff --git a/VERSION b/VERSION index 0c4b4549..a1dad2aa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.22 +0.3.23 diff --git a/src/UGN/Apis/AddRoutePolicyRequest.php b/src/UGN/Apis/AddRoutePolicyRequest.php new file mode 100644 index 00000000..071e57e2 --- /dev/null +++ b/src/UGN/Apis/AddRoutePolicyRequest.php @@ -0,0 +1,94 @@ + "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()); + } +} diff --git a/src/UGN/Apis/AddRoutePolicyResponse.php b/src/UGN/Apis/AddRoutePolicyResponse.php new file mode 100644 index 00000000..69e405b1 --- /dev/null +++ b/src/UGN/Apis/AddRoutePolicyResponse.php @@ -0,0 +1,26 @@ + "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; + } +} diff --git a/src/UGN/Apis/AttachUGNNetworksResponse.php b/src/UGN/Apis/AttachUGNNetworksResponse.php new file mode 100644 index 00000000..9648742c --- /dev/null +++ b/src/UGN/Apis/AttachUGNNetworksResponse.php @@ -0,0 +1,77 @@ +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); + } +} diff --git a/src/UGN/Apis/CreateSimpleUGNBwPackageRequest.php b/src/UGN/Apis/CreateSimpleUGNBwPackageRequest.php new file mode 100644 index 00000000..8262ca64 --- /dev/null +++ b/src/UGN/Apis/CreateSimpleUGNBwPackageRequest.php @@ -0,0 +1,297 @@ + "CreateSimpleUGNBwPackage"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGNID"); + $this->markRequired("RegionA"); + $this->markRequired("RegionB"); + $this->markRequired("BandWidth"); + $this->markRequired("PayMode"); + $this->markRequired("ChargeType"); + $this->markRequired("Quantity"); + } + + + + /** + * 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); + } + + /** + * RegionA: 地域 A 名称 + * + * @return string|null + */ + public function getRegionA() + { + return $this->get("RegionA"); + } + + /** + * RegionA: 地域 A 名称 + * + * @param string $regionA + */ + public function setRegionA($regionA) + { + $this->set("RegionA", $regionA); + } + + /** + * RegionB: 地域 B 名称 + * + * @return string|null + */ + public function getRegionB() + { + return $this->get("RegionB"); + } + + /** + * RegionB: 地域 B 名称 + * + * @param string $regionB + */ + public function setRegionB($regionB) + { + $this->set("RegionB", $regionB); + } + + /** + * BandWidth: 购买的带宽值 + * + * @return integer|null + */ + public function getBandWidth() + { + return $this->get("BandWidth"); + } + + /** + * BandWidth: 购买的带宽值 + * + * @param int $bandWidth + */ + public function setBandWidth($bandWidth) + { + $this->set("BandWidth", $bandWidth); + } + + /** + * PayMode: 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:后付费 + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:后付费 + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ChargeType: 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买份数,主要用于预付费 + * + * @return float|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买份数,主要用于预付费 + * + * @param float $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Name: 带宽包名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 带宽包名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Qos: 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * + * @return string|null + */ + public function getQos() + { + return $this->get("Qos"); + } + + /** + * Qos: 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * + * @param string $qos + */ + public function setQos($qos) + { + $this->set("Qos", $qos); + } + + /** + * Path: 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * + * @return string|null + */ + public function getPath() + { + return $this->get("Path"); + } + + /** + * Path: 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * CouponId: 代金券 id + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券 id + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UGN/Apis/CreateSimpleUGNBwPackageResponse.php b/src/UGN/Apis/CreateSimpleUGNBwPackageResponse.php new file mode 100644 index 00000000..8325ce8a --- /dev/null +++ b/src/UGN/Apis/CreateSimpleUGNBwPackageResponse.php @@ -0,0 +1,26 @@ + "CreateUGN"]); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * Name: UGN名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: UGN名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Networks: + * + * @return CreateUGNParamNetworks[]|null + */ + public function getNetworks() + { + $items = $this->get("Networks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUGNParamNetworks($item)); + } + return $result; + } + + /** + * Networks: + * + * @param CreateUGNParamNetworks[] $networks + */ + public function setNetworks(array $networks) + { + $result = []; + foreach ($networks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Apis/CreateUGNResponse.php b/src/UGN/Apis/CreateUGNResponse.php new file mode 100644 index 00000000..45a0f93b --- /dev/null +++ b/src/UGN/Apis/CreateUGNResponse.php @@ -0,0 +1,77 @@ +get("UGNID"); + } + + /** + * UGNID: UGN ID + * + * @param string $ugnid + */ + public function setUGNID($ugnid) + { + $this->set("UGNID", $ugnid); + } + + /** + * Networks: 网络实例列表 + * + * @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: 网络实例列表 + * + * @param Network[] $networks + */ + public function setNetworks(array $networks) + { + $result = []; + foreach ($networks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Apis/DelUGNRequest.php b/src/UGN/Apis/DelUGNRequest.php new file mode 100644 index 00000000..ed4cad60 --- /dev/null +++ b/src/UGN/Apis/DelUGNRequest.php @@ -0,0 +1,71 @@ + "DelUGN"]); + $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: UGNID + * + * @return string|null + */ + public function getUGNID() + { + return $this->get("UGNID"); + } + + /** + * UGNID: UGNID + * + * @param string $ugnid + */ + public function setUGNID($ugnid) + { + $this->set("UGNID", $ugnid); + } +} diff --git a/src/UGN/Apis/DelUGNResponse.php b/src/UGN/Apis/DelUGNResponse.php new file mode 100644 index 00000000..80f4a1b5 --- /dev/null +++ b/src/UGN/Apis/DelUGNResponse.php @@ -0,0 +1,26 @@ + "DeleteRoutePolicy"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGNID"); + $this->markRequired("PolicyIds"); + } + + + + /** + * 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); + } + + /** + * PolicyIds: 需要删除的路由策略ID数组 + * + * @return string[]|null + */ + public function getPolicyIds() + { + return $this->get("PolicyIds"); + } + + /** + * PolicyIds: 需要删除的路由策略ID数组 + * + * @param string[] $policyIds + */ + public function setPolicyIds(array $policyIds) + { + $this->set("PolicyIds", $policyIds); + } +} diff --git a/src/UGN/Apis/DeleteRoutePolicyResponse.php b/src/UGN/Apis/DeleteRoutePolicyResponse.php new file mode 100644 index 00000000..94fb5024 --- /dev/null +++ b/src/UGN/Apis/DeleteRoutePolicyResponse.php @@ -0,0 +1,26 @@ + "DeleteUGNBwPackage"]); + $this->markRequired("BwPackageID"); + $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); + } + + /** + * BwPackageID: 带宽包ID + * + * @return string|null + */ + public function getBwPackageID() + { + return $this->get("BwPackageID"); + } + + /** + * BwPackageID: 带宽包ID + * + * @param string $bwPackageID + */ + public function setBwPackageID($bwPackageID) + { + $this->set("BwPackageID", $bwPackageID); + } + + /** + * UGNID: UGNID + * + * @return string|null + */ + public function getUGNID() + { + return $this->get("UGNID"); + } + + /** + * UGNID: UGNID + * + * @param string $ugnid + */ + public function setUGNID($ugnid) + { + $this->set("UGNID", $ugnid); + } +} diff --git a/src/UGN/Apis/DeleteUGNBwPackageResponse.php b/src/UGN/Apis/DeleteUGNBwPackageResponse.php new file mode 100644 index 00000000..5c50f322 --- /dev/null +++ b/src/UGN/Apis/DeleteUGNBwPackageResponse.php @@ -0,0 +1,26 @@ + "DescribeSimpleUGN"]); + $this->markRequired("ProjectId"); $this->markRequired("UGNID"); } diff --git a/src/UGN/Apis/DescribeSimpleUGNResponse.php b/src/UGN/Apis/DescribeSimpleUGNResponse.php index b3ded688..1247fe71 100644 --- a/src/UGN/Apis/DescribeSimpleUGNResponse.php +++ b/src/UGN/Apis/DescribeSimpleUGNResponse.php @@ -1,6 +1,6 @@ get("Policies"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Policy($item)); + } + return $result; + } + + /** + * Policies: 云联网的路由策略基本信息 + * + * @param Policy[] $policies + */ + public function setPolicies(array $policies) + { + $result = []; + foreach ($policies as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UGN/Apis/DetachUGNNetworksRequest.php b/src/UGN/Apis/DetachUGNNetworksRequest.php new file mode 100644 index 00000000..d4c7bd34 --- /dev/null +++ b/src/UGN/Apis/DetachUGNNetworksRequest.php @@ -0,0 +1,92 @@ + "DetachUGNNetworks"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGNID"); + $this->markRequired("Networks"); + } + + + + /** + * 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: UGNID + * + * @return string|null + */ + public function getUGNID() + { + return $this->get("UGNID"); + } + + /** + * UGNID: UGNID + * + * @param string $ugnid + */ + public function setUGNID($ugnid) + { + $this->set("UGNID", $ugnid); + } + + /** + * Networks: 网络实例 ID + * + * @return string[]|null + */ + public function getNetworks() + { + return $this->get("Networks"); + } + + /** + * Networks: 网络实例 ID + * + * @param string[] $networks + */ + public function setNetworks(array $networks) + { + $this->set("Networks", $networks); + } +} diff --git a/src/UGN/Apis/DetachUGNNetworksResponse.php b/src/UGN/Apis/DetachUGNNetworksResponse.php new file mode 100644 index 00000000..fec3d482 --- /dev/null +++ b/src/UGN/Apis/DetachUGNNetworksResponse.php @@ -0,0 +1,77 @@ +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); + } +} diff --git a/src/UGN/Apis/EnableRoutePolicyRequest.php b/src/UGN/Apis/EnableRoutePolicyRequest.php new file mode 100644 index 00000000..58a3e367 --- /dev/null +++ b/src/UGN/Apis/EnableRoutePolicyRequest.php @@ -0,0 +1,113 @@ + "EnableRoutePolicy"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGNID"); + $this->markRequired("PolicyId"); + $this->markRequired("Enable"); + } + + + + /** + * 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); + } + + /** + * PolicyId: 路由策略ID + * + * @return string|null + */ + public function getPolicyId() + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 路由策略ID + * + * @param string $policyId + */ + public function setPolicyId($policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * Enable: 是否启用 + * + * @return boolean|null + */ + public function getEnable() + { + return $this->get("Enable"); + } + + /** + * Enable: 是否启用 + * + * @param boolean $enable + */ + public function setEnable($enable) + { + $this->set("Enable", $enable); + } +} diff --git a/src/UGN/Apis/EnableRoutePolicyResponse.php b/src/UGN/Apis/EnableRoutePolicyResponse.php new file mode 100644 index 00000000..8d3f584d --- /dev/null +++ b/src/UGN/Apis/EnableRoutePolicyResponse.php @@ -0,0 +1,26 @@ + "GetSimpleBuyBwPrice"]); + $this->markRequired("ProjectId"); + $this->markRequired("RegionA"); + $this->markRequired("RegionB"); + $this->markRequired("PayMode"); + $this->markRequired("ChargeType"); + $this->markRequired("Qos"); + $this->markRequired("Path"); + } + + + + /** + * 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); + } + + /** + * RegionA: 地域 A 名称 + * + * @return string|null + */ + public function getRegionA() + { + return $this->get("RegionA"); + } + + /** + * RegionA: 地域 A 名称 + * + * @param string $regionA + */ + public function setRegionA($regionA) + { + $this->set("RegionA", $regionA); + } + + /** + * RegionB: 地域 B 名称 + * + * @return string|null + */ + public function getRegionB() + { + return $this->get("RegionB"); + } + + /** + * RegionB: 地域 B 名称 + * + * @param string $regionB + */ + public function setRegionB($regionB) + { + $this->set("RegionB", $regionB); + } + + /** + * PayMode: 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:按量付费 + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:按量付费 + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ChargeType: 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Qos: 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * + * @return string|null + */ + public function getQos() + { + return $this->get("Qos"); + } + + /** + * Qos: 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * + * @param string $qos + */ + public function setQos($qos) + { + $this->set("Qos", $qos); + } + + /** + * Path: 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * + * @return string|null + */ + public function getPath() + { + return $this->get("Path"); + } + + /** + * Path: 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * BandWidth: 购买的带宽值,默认为1 + * + * @return integer|null + */ + public function getBandWidth() + { + return $this->get("BandWidth"); + } + + /** + * BandWidth: 购买的带宽值,默认为1 + * + * @param int $bandWidth + */ + public function setBandWidth($bandWidth) + { + $this->set("BandWidth", $bandWidth); + } +} diff --git a/src/UGN/Apis/GetSimpleBuyBwPriceResponse.php b/src/UGN/Apis/GetSimpleBuyBwPriceResponse.php new file mode 100644 index 00000000..6ac39922 --- /dev/null +++ b/src/UGN/Apis/GetSimpleBuyBwPriceResponse.php @@ -0,0 +1,84 @@ +get("TotalPrice"); + } + + /** + * TotalPrice: 最终价格 = 原价 * 用户折扣 * 产品折扣 + * + * @param int $totalPrice + */ + public function setTotalPrice($totalPrice) + { + $this->set("TotalPrice", $totalPrice); + } + + /** + * CustomPrice: 客户折扣价 = 原价 * 用户折扣 + * + * @return integer|null + */ + public function getCustomPrice() + { + return $this->get("CustomPrice"); + } + + /** + * CustomPrice: 客户折扣价 = 原价 * 用户折扣 + * + * @param int $customPrice + */ + public function setCustomPrice($customPrice) + { + $this->set("CustomPrice", $customPrice); + } + + /** + * OriginalPrice: 原价 + * + * @return integer|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param int $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UGN/Apis/GetSimpleUGNBwPackagesRequest.php b/src/UGN/Apis/GetSimpleUGNBwPackagesRequest.php index 317abbd6..21daa14e 100644 --- a/src/UGN/Apis/GetSimpleUGNBwPackagesRequest.php +++ b/src/UGN/Apis/GetSimpleUGNBwPackagesRequest.php @@ -1,6 +1,6 @@ set("Limit", $limit); } + + /** + * PackageIds: 带宽包ID列表,不填查询UGN下全部带宽包 + * + * @return string[]|null + */ + public function getPackageIds() + { + return $this->get("PackageIds"); + } + + /** + * PackageIds: 带宽包ID列表,不填查询UGN下全部带宽包 + * + * @param string[] $packageIds + */ + public function setPackageIds(array $packageIds) + { + $this->set("PackageIds", $packageIds); + } } diff --git a/src/UGN/Apis/GetSimpleUGNBwPackagesResponse.php b/src/UGN/Apis/GetSimpleUGNBwPackagesResponse.php index 7bffa476..397642f2 100644 --- a/src/UGN/Apis/GetSimpleUGNBwPackagesResponse.php +++ b/src/UGN/Apis/GetSimpleUGNBwPackagesResponse.php @@ -1,6 +1,6 @@ "GetSwitchableBillingModes"]); + $this->markRequired("ProjectId"); + $this->markRequired("BwPackageID"); + } + + + + /** + * 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); + } + + /** + * BwPackageID: 带宽包 id + * + * @return string|null + */ + public function getBwPackageID() + { + return $this->get("BwPackageID"); + } + + /** + * BwPackageID: 带宽包 id + * + * @param string $bwPackageID + */ + public function setBwPackageID($bwPackageID) + { + $this->set("BwPackageID", $bwPackageID); + } +} diff --git a/src/UGN/Apis/GetSwitchableBillingModesResponse.php b/src/UGN/Apis/GetSwitchableBillingModesResponse.php new file mode 100644 index 00000000..cd85313e --- /dev/null +++ b/src/UGN/Apis/GetSwitchableBillingModesResponse.php @@ -0,0 +1,44 @@ +get("PayModes"); + } + + /** + * PayModes: 支持的计费类型。FixedBw:固定带宽,Traffic:流量计费,Max5:第五峰值。 + * + * @param string[] $payModes + */ + public function setPayModes(array $payModes) + { + $this->set("PayModes", $payModes); + } +} diff --git a/src/UGN/Apis/GetUGNRouteTableRequest.php b/src/UGN/Apis/GetUGNRouteTableRequest.php new file mode 100644 index 00000000..df41cc20 --- /dev/null +++ b/src/UGN/Apis/GetUGNRouteTableRequest.php @@ -0,0 +1,92 @@ + "GetUGNRouteTable"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGNID"); + $this->markRequired("Type"); + } + + + + /** + * 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); + } + + /** + * Type: 路由表类型,分为初始路由表、中阶路由表以及最终路由表,限定取值:"Origin"/"Middle"/"Final" + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 路由表类型,分为初始路由表、中阶路由表以及最终路由表,限定取值:"Origin"/"Middle"/"Final" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UGN/Apis/GetUGNRouteTableResponse.php b/src/UGN/Apis/GetUGNRouteTableResponse.php new file mode 100644 index 00000000..df898364 --- /dev/null +++ b/src/UGN/Apis/GetUGNRouteTableResponse.php @@ -0,0 +1,111 @@ +get("UGNID"); + } + + /** + * UGNID: 云联网实例ID + * + * @param string $ugnid + */ + public function setUGNID($ugnid) + { + $this->set("UGNID", $ugnid); + } + + /** + * Routes: 路由表,"Origin"/"Middle" 用这个 + * + * @return SimpleRoute[]|null + */ + public function getRoutes() + { + $items = $this->get("Routes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SimpleRoute($item)); + } + return $result; + } + + /** + * Routes: 路由表,"Origin"/"Middle" 用这个 + * + * @param SimpleRoute[] $routes + */ + public function setRoutes(array $routes) + { + $result = []; + foreach ($routes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VRoutes: 网络实例对应的路由表,"Final" 用这个 + * + * @return VRoute[]|null + */ + public function getVRoutes() + { + $items = $this->get("VRoutes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VRoute($item)); + } + return $result; + } + + /** + * VRoutes: 网络实例对应的路由表,"Final" 用这个 + * + * @param VRoute[] $vRoutes + */ + public function setVRoutes(array $vRoutes) + { + $result = []; + foreach ($vRoutes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Apis/ListSimpleBwPackageRequest.php b/src/UGN/Apis/ListSimpleBwPackageRequest.php index bbc8ef3f..46b3a9fa 100644 --- a/src/UGN/Apis/ListSimpleBwPackageRequest.php +++ b/src/UGN/Apis/ListSimpleBwPackageRequest.php @@ -1,6 +1,6 @@ "ListUGNRegions"]); + } + + + + /** + * SelectedRegions: 数组,已选区域,例如:cn-bj2, cn-wlcb + * + * @return string[]|null + */ + public function getSelectedRegions() + { + return $this->get("SelectedRegions"); + } + + /** + * SelectedRegions: 数组,已选区域,例如:cn-bj2, cn-wlcb + * + * @param string[] $selectedRegions + */ + public function setSelectedRegions(array $selectedRegions) + { + $this->set("SelectedRegions", $selectedRegions); + } +} diff --git a/src/UGN/Apis/ListUGNRegionsResponse.php b/src/UGN/Apis/ListUGNRegionsResponse.php new file mode 100644 index 00000000..61c21d71 --- /dev/null +++ b/src/UGN/Apis/ListUGNRegionsResponse.php @@ -0,0 +1,57 @@ +get("RegionLIst"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UgnRegion($item)); + } + return $result; + } + + /** + * RegionLIst: 可加入地域列表 + * + * @param UgnRegion[] $regionLIst + */ + public function setRegionLIst(array $regionLIst) + { + $result = []; + foreach ($regionLIst as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Apis/ListUGNRequest.php b/src/UGN/Apis/ListUGNRequest.php index 73ede28a..0b57f5c5 100644 --- a/src/UGN/Apis/ListUGNRequest.php +++ b/src/UGN/Apis/ListUGNRequest.php @@ -1,6 +1,6 @@ "SendUGNApplyNetwork"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("NetworkID"); + $this->markRequired("NetworkType"); + $this->markRequired("NetworkRegion"); + $this->markRequired("NetworkOrgName"); + $this->markRequired("UGNID"); + $this->markRequired("UGNCompanyID"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * NetworkID: 网络实例 ID,如 uvnet-xxxx + * + * @return string|null + */ + public function getNetworkID() + { + return $this->get("NetworkID"); + } + + /** + * NetworkID: 网络实例 ID,如 uvnet-xxxx + * + * @param string $networkID + */ + public function setNetworkID($networkID) + { + $this->set("NetworkID", $networkID); + } + + /** + * NetworkType: 网络实例类型,枚举值:VPC/UWAN-VRouter/... + * + * @return string|null + */ + public function getNetworkType() + { + return $this->get("NetworkType"); + } + + /** + * NetworkType: 网络实例类型,枚举值:VPC/UWAN-VRouter/... + * + * @param string $networkType + */ + public function setNetworkType($networkType) + { + $this->set("NetworkType", $networkType); + } + + /** + * NetworkRegion: 网络实例所属地域,如 cn-sh2 + * + * @return string|null + */ + public function getNetworkRegion() + { + return $this->get("NetworkRegion"); + } + + /** + * NetworkRegion: 网络实例所属地域,如 cn-sh2 + * + * @param string $networkRegion + */ + public function setNetworkRegion($networkRegion) + { + $this->set("NetworkRegion", $networkRegion); + } + + /** + * NetworkOrgName: 网络实例所属项目名,如 org-xxx + * + * @return string|null + */ + public function getNetworkOrgName() + { + return $this->get("NetworkOrgName"); + } + + /** + * NetworkOrgName: 网络实例所属项目名,如 org-xxx + * + * @param string $networkOrgName + */ + public function setNetworkOrgName($networkOrgName) + { + $this->set("NetworkOrgName", $networkOrgName); + } + + /** + * 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); + } + + /** + * UGNCompanyID: UGN所属公司 id + * + * @return integer|null + */ + public function getUGNCompanyID() + { + return $this->get("UGNCompanyID"); + } + + /** + * UGNCompanyID: UGN所属公司 id + * + * @param int $ugnCompanyID + */ + public function setUGNCompanyID($ugnCompanyID) + { + $this->set("UGNCompanyID", $ugnCompanyID); + } +} diff --git a/src/UGN/Apis/SendUGNApplyNetworkResponse.php b/src/UGN/Apis/SendUGNApplyNetworkResponse.php new file mode 100644 index 00000000..d13bf143 --- /dev/null +++ b/src/UGN/Apis/SendUGNApplyNetworkResponse.php @@ -0,0 +1,26 @@ + "UpdateRoutePolicy"]); + $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 UpdateRoutePolicyParamPolicy|null + */ + public function getPolicy() + { + return new UpdateRoutePolicyParamPolicy($this->get("Policy")); + } + + /** + * Policy: + * + * @param UpdateRoutePolicyParamPolicy $policy + */ + public function setPolicy(array $policy) + { + $this->set("Policy", $policy->getAll()); + } +} diff --git a/src/UGN/Apis/UpdateRoutePolicyResponse.php b/src/UGN/Apis/UpdateRoutePolicyResponse.php new file mode 100644 index 00000000..5045a581 --- /dev/null +++ b/src/UGN/Apis/UpdateRoutePolicyResponse.php @@ -0,0 +1,26 @@ +get("Region"); + } + + /** + * Region: 网络实例所在地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * NetworkID: 网络实例的ID,如 vnet-xxxxx + * + * @return string|null + */ + public function getNetworkID() + { + return $this->get("NetworkID"); + } + + /** + * NetworkID: 网络实例的ID,如 vnet-xxxxx + * + * @param string $networkID + */ + public function setNetworkID($networkID) + { + $this->set("NetworkID", $networkID); + } + + /** + * Name: 网络实例名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 网络实例名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Type: 网络实例类型:VPC/UCVR/... + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 网络实例类型:VPC/UCVR/... + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * OrgName: 网络实例所在项目名 + * + * @return string|null + */ + public function getOrgName() + { + return $this->get("OrgName"); + } + + /** + * OrgName: 网络实例所在项目名 + * + * @param string $orgName + */ + public function setOrgName($orgName) + { + $this->set("OrgName", $orgName); + } + + /** + * CompanyID: 网络实例所属公司ID + * + * @return integer|null + */ + public function getCompanyID() + { + return $this->get("CompanyID"); + } + + /** + * CompanyID: 网络实例所属公司ID + * + * @param int $companyID + */ + public function setCompanyID($companyID) + { + $this->set("CompanyID", $companyID); + } + + /** + * RegionID: 网络实例所在地域ID + * + * @return integer|null + */ + public function getRegionID() + { + return $this->get("RegionID"); + } + + /** + * RegionID: 网络实例所在地域ID + * + * @param int $regionID + */ + public function setRegionID($regionID) + { + $this->set("RegionID", $regionID); + } + + /** + * OrgID: 网络实例所在项目的ID + * + * @return integer|null + */ + public function getOrgID() + { + return $this->get("OrgID"); + } + + /** + * OrgID: 网络实例所在项目的ID + * + * @param int $orgID + */ + public function setOrgID($orgID) + { + $this->set("OrgID", $orgID); + } + + /** + * VNI: 网络实例的唯一标识,如 vpc 的 tunnel_id + * + * @return integer|null + */ + public function getVNI() + { + return $this->get("VNI"); + } + + /** + * VNI: 网络实例的唯一标识,如 vpc 的 tunnel_id + * + * @param int $vni + */ + public function setVNI($vni) + { + $this->set("VNI", $vni); + } + + /** + * InsertTime: 创建时间 + * + * @return integer|null + */ + public function getInsertTime() + { + return $this->get("InsertTime"); + } + + /** + * InsertTime: 创建时间 + * + * @param int $insertTime + */ + public function setInsertTime($insertTime) + { + $this->set("InsertTime", $insertTime); + } +} diff --git a/src/UGN/Models/NetworkAndPrefix.php b/src/UGN/Models/NetworkAndPrefix.php new file mode 100644 index 00000000..c8d27e25 --- /dev/null +++ b/src/UGN/Models/NetworkAndPrefix.php @@ -0,0 +1,64 @@ +get("NetworkId"); + } + + /** + * NetworkId: 网络实例ID + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Prefixes: 网络实例上报的网段 + * + * @return string[]|null + */ + public function getPrefixes() + { + return $this->get("Prefixes"); + } + + /** + * Prefixes: 网络实例上报的网段 + * + * @param string[] $prefixes + */ + public function setPrefixes(array $prefixes) + { + $this->set("Prefixes", $prefixes); + } +} diff --git a/src/UGN/Models/Policy.php b/src/UGN/Models/Policy.php new file mode 100644 index 00000000..9c4657a9 --- /dev/null +++ b/src/UGN/Models/Policy.php @@ -0,0 +1,348 @@ +get("Region"); + } + + /** + * Region: 作用地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * PolicyId: 路由策略ID + * + * @return string|null + */ + public function getPolicyId() + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 路由策略ID + * + * @param string $policyId + */ + public function setPolicyId($policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * Name: 路由策略名称,限定长度255 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 路由策略名称,限定长度255 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Direction: 策略方向,限定取值:"In"/"Out" + * + * @return string|null + */ + public function getDirection() + { + return $this->get("Direction"); + } + + /** + * Direction: 策略方向,限定取值:"In"/"Out" + * + * @param string $direction + */ + public function setDirection($direction) + { + $this->set("Direction", $direction); + } + + /** + * Enabled: 是否启用 + * + * @return boolean|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 是否启用 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Action: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @return string|null + */ + public function getAction() + { + return $this->get("Action"); + } + + /** + * Action: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @param string $action + */ + public function setAction($action) + { + $this->set("Action", $action); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @return integer|null + */ + public function getRoutePriority() + { + return $this->get("RoutePriority"); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @param int $routePriority + */ + public function setRoutePriority($routePriority) + { + $this->set("RoutePriority", $routePriority); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @return string[]|null + */ + public function getSrcRegions() + { + return $this->get("SrcRegions"); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @param string[] $srcRegions + */ + public function setSrcRegions(array $srcRegions) + { + $this->set("SrcRegions", $srcRegions); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @return string[]|null + */ + public function getSrcNetworkTypes() + { + return $this->get("SrcNetworkTypes"); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @param string[] $srcNetworkTypes + */ + public function setSrcNetworkTypes(array $srcNetworkTypes) + { + $this->set("SrcNetworkTypes", $srcNetworkTypes); + } + + /** + * SrcNetworks: 路由策略需要匹配的路由的网络实例类型以及该实例下的网段信息 + * + * @return NetworkAndPrefix[]|null + */ + public function getSrcNetworks() + { + $items = $this->get("SrcNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NetworkAndPrefix($item)); + } + return $result; + } + + /** + * SrcNetworks: 路由策略需要匹配的路由的网络实例类型以及该实例下的网段信息 + * + * @param NetworkAndPrefix[] $srcNetworks + */ + public function setSrcNetworks(array $srcNetworks) + { + $result = []; + foreach ($srcNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @return string[]|null + */ + public function getDstNetworkTypes() + { + return $this->get("DstNetworkTypes"); + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @param string[] $dstNetworkTypes + */ + public function setDstNetworkTypes(array $dstNetworkTypes) + { + $this->set("DstNetworkTypes", $dstNetworkTypes); + } + + /** + * DstNetworks: 路由策略需要作用的网络实例ID + * + * @return NetworkAndPrefix[]|null + */ + public function getDstNetworks() + { + $items = $this->get("DstNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NetworkAndPrefix($item)); + } + return $result; + } + + /** + * DstNetworks: 路由策略需要作用的网络实例ID + * + * @param NetworkAndPrefix[] $dstNetworks + */ + public function setDstNetworks(array $dstNetworks) + { + $result = []; + foreach ($dstNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Matched: 是否匹配中路由 + * + * @return boolean|null + */ + public function getMatched() + { + return $this->get("Matched"); + } + + /** + * Matched: 是否匹配中路由 + * + * @param boolean $matched + */ + public function setMatched($matched) + { + $this->set("Matched", $matched); + } +} diff --git a/src/UGN/Models/SimpleBwPackage.php b/src/UGN/Models/SimpleBwPackage.php index c4f2c29e..dcfe1f87 100644 --- a/src/UGN/Models/SimpleBwPackage.php +++ b/src/UGN/Models/SimpleBwPackage.php @@ -1,6 +1,6 @@ set("Priority", $priority); } + + /** + * Deny: true: 由于命中路由策略而失效 + * + * @return boolean|null + */ + public function getDeny() + { + return $this->get("Deny"); + } + + /** + * Deny: true: 由于命中路由策略而失效 + * + * @param boolean $deny + */ + public function setDeny($deny) + { + $this->set("Deny", $deny); + } + + /** + * Restrict: true: 由于优先级比其他前缀相同的路由低而失效 + * + * @return boolean|null + */ + public function getRestrict() + { + return $this->get("Restrict"); + } + + /** + * Restrict: true: 由于优先级比其他前缀相同的路由低而失效 + * + * @param boolean $restrict + */ + public function setRestrict($restrict) + { + $this->set("Restrict", $restrict); + } + + /** + * Conflict: true: 由于优先级相同但插入数据库的时间比其他前缀相同的路由晚而失效 + * + * @return boolean|null + */ + public function getConflict() + { + return $this->get("Conflict"); + } + + /** + * Conflict: true: 由于优先级相同但插入数据库的时间比其他前缀相同的路由晚而失效 + * + * @param boolean $conflict + */ + public function setConflict($conflict) + { + $this->set("Conflict", $conflict); + } + + /** + * InPolicyId: 匹配中的入向路由策略id + * + * @return string|null + */ + public function getInPolicyId() + { + return $this->get("InPolicyId"); + } + + /** + * InPolicyId: 匹配中的入向路由策略id + * + * @param string $inPolicyId + */ + public function setInPolicyId($inPolicyId) + { + $this->set("InPolicyId", $inPolicyId); + } + + /** + * InPolicyName: 匹配中的入向路由策略名称 + * + * @return string|null + */ + public function getInPolicyName() + { + return $this->get("InPolicyName"); + } + + /** + * InPolicyName: 匹配中的入向路由策略名称 + * + * @param string $inPolicyName + */ + public function setInPolicyName($inPolicyName) + { + $this->set("InPolicyName", $inPolicyName); + } + + /** + * OutPolicyId: 匹配中的出向路由策略id + * + * @return string|null + */ + public function getOutPolicyId() + { + return $this->get("OutPolicyId"); + } + + /** + * OutPolicyId: 匹配中的出向路由策略id + * + * @param string $outPolicyId + */ + public function setOutPolicyId($outPolicyId) + { + $this->set("OutPolicyId", $outPolicyId); + } + + /** + * OutPolicyName: 匹配中的出向路由策略名称 + * + * @return string|null + */ + public function getOutPolicyName() + { + return $this->get("OutPolicyName"); + } + + /** + * OutPolicyName: 匹配中的出向路由策略名称 + * + * @param string $outPolicyName + */ + public function setOutPolicyName($outPolicyName) + { + $this->set("OutPolicyName", $outPolicyName); + } } diff --git a/src/UGN/Models/UGN.php b/src/UGN/Models/UGN.php index e07c5be1..cf840488 100644 --- a/src/UGN/Models/UGN.php +++ b/src/UGN/Models/UGN.php @@ -1,6 +1,6 @@ set("BwPackageCount", $bwPackageCount); } + + /** + * PolicyCount: 关联的路由策略数量 + * + * @return integer|null + */ + public function getPolicyCount() + { + return $this->get("PolicyCount"); + } + + /** + * PolicyCount: 关联的路由策略数量 + * + * @param int $policyCount + */ + public function setPolicyCount($policyCount) + { + $this->set("PolicyCount", $policyCount); + } + + /** + * ApplyNetworksCount: 申请待加入的网络数量 + * + * @return integer|null + */ + public function getApplyNetworksCount() + { + return $this->get("ApplyNetworksCount"); + } + + /** + * ApplyNetworksCount: 申请待加入的网络数量 + * + * @param int $applyNetworksCount + */ + public function setApplyNetworksCount($applyNetworksCount) + { + $this->set("ApplyNetworksCount", $applyNetworksCount); + } } diff --git a/src/UGN/Models/UgnRegion.php b/src/UGN/Models/UgnRegion.php new file mode 100644 index 00000000..2a10a071 --- /dev/null +++ b/src/UGN/Models/UgnRegion.php @@ -0,0 +1,124 @@ +get("Region"); + } + + /** + * Region: 地域名称 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * RegIonId: 地域ID + * + * @return integer|null + */ + public function getRegIonId() + { + return $this->get("RegIonId"); + } + + /** + * RegIonId: 地域ID + * + * @param int $regIonId + */ + public function setRegIonId($regIonId) + { + $this->set("RegIonId", $regIonId); + } + + /** + * IsOverseas: 是否为海外地域 + * + * @return boolean|null + */ + public function getIsOverseas() + { + return $this->get("IsOverseas"); + } + + /** + * IsOverseas: 是否为海外地域 + * + * @param boolean $isOverseas + */ + public function setIsOverseas($isOverseas) + { + $this->set("IsOverseas", $isOverseas); + } + + /** + * IsOnline: 是否上线 + * + * @return boolean|null + */ + public function getIsOnline() + { + return $this->get("IsOnline"); + } + + /** + * IsOnline: 是否上线 + * + * @param boolean $isOnline + */ + public function setIsOnline($isOnline) + { + $this->set("IsOnline", $isOnline); + } + + /** + * Needs: 添加region需要做的校验 + * + * @return string[]|null + */ + public function getNeeds() + { + return $this->get("Needs"); + } + + /** + * Needs: 添加region需要做的校验 + * + * @param string[] $needs + */ + public function setNeeds(array $needs) + { + $this->set("Needs", $needs); + } +} diff --git a/src/UGN/Models/VRoute.php b/src/UGN/Models/VRoute.php new file mode 100644 index 00000000..85b0bca6 --- /dev/null +++ b/src/UGN/Models/VRoute.php @@ -0,0 +1,76 @@ +get("NetworkId"); + } + + /** + * NetworkId: 网络实例ID + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Routes: 该网络实例对应的路由 + * + * @return SimpleRoute[]|null + */ + public function getRoutes() + { + $items = $this->get("Routes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SimpleRoute($item)); + } + return $result; + } + + /** + * Routes: 该网络实例对应的路由 + * + * @param SimpleRoute[] $routes + */ + public function setRoutes(array $routes) + { + $result = []; + foreach ($routes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Params/AddRoutePolicyParamPolicy.php b/src/UGN/Params/AddRoutePolicyParamPolicy.php new file mode 100644 index 00000000..95989c13 --- /dev/null +++ b/src/UGN/Params/AddRoutePolicyParamPolicy.php @@ -0,0 +1,248 @@ +get("Direction"); + } + + /** + * Direction: 策略方向,限定取值:"In"/"Out" + * + * @param string $direction + */ + public function setDirection($direction) + { + $this->set("Direction", $direction); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * RouteAction: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @return string|null + */ + public function getRouteAction() + { + return $this->get("RouteAction"); + } + + /** + * RouteAction: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @param string $routeAction + */ + public function setRouteAction($routeAction) + { + $this->set("RouteAction", $routeAction); + } + + /** + * SrcNetworks: + * + * @return AddRoutePolicyParamPolicySrcNetworks[]|null + */ + public function getSrcNetworks() + { + $items = $this->get("SrcNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddRoutePolicyParamPolicySrcNetworks($item)); + } + return $result; + } + + /** + * SrcNetworks: + * + * @param AddRoutePolicyParamPolicySrcNetworks[] $srcNetworks + */ + public function setSrcNetworks(array $srcNetworks) + { + $result = []; + foreach ($srcNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Name: 策略名称,限定长度255 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 策略名称,限定长度255 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @return integer|null + */ + public function getRoutePriority() + { + return $this->get("RoutePriority"); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @param int $routePriority + */ + public function setRoutePriority($routePriority) + { + $this->set("RoutePriority", $routePriority); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @return string[]|null + */ + public function getSrcRegions() + { + return $this->get("SrcRegions"); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @param string[] $srcRegions + */ + public function setSrcRegions(array $srcRegions) + { + $this->set("SrcRegions", $srcRegions); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @return string[]|null + */ + public function getSrcNetworkTypes() + { + return $this->get("SrcNetworkTypes"); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @param string[] $srcNetworkTypes + */ + public function setSrcNetworkTypes(array $srcNetworkTypes) + { + $this->set("SrcNetworkTypes", $srcNetworkTypes); + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter","Direction" 为 "In" 时,该值无效 + * + * @return string[]|null + */ + public function getDstNetworkTypes() + { + return $this->get("DstNetworkTypes"); + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter","Direction" 为 "In" 时,该值无效 + * + * @param string[] $dstNetworkTypes + */ + public function setDstNetworkTypes(array $dstNetworkTypes) + { + $this->set("DstNetworkTypes", $dstNetworkTypes); + } + + /** + * DstNetworks: + * + * @return AddRoutePolicyParamPolicyDstNetworks[]|null + */ + public function getDstNetworks() + { + $items = $this->get("DstNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddRoutePolicyParamPolicyDstNetworks($item)); + } + return $result; + } + + /** + * DstNetworks: + * + * @param AddRoutePolicyParamPolicyDstNetworks[] $dstNetworks + */ + public function setDstNetworks(array $dstNetworks) + { + $result = []; + foreach ($dstNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Params/AddRoutePolicyParamPolicyDstNetworks.php b/src/UGN/Params/AddRoutePolicyParamPolicyDstNetworks.php new file mode 100644 index 00000000..602cf22c --- /dev/null +++ b/src/UGN/Params/AddRoutePolicyParamPolicyDstNetworks.php @@ -0,0 +1,44 @@ +get("NetworkId"); + } + + /** + * NetworkId: 路由策略需要作用的网络实例ID数组,"Direction" 为 "In" 时,该值无效 + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } +} diff --git a/src/UGN/Params/AddRoutePolicyParamPolicySrcNetworks.php b/src/UGN/Params/AddRoutePolicyParamPolicySrcNetworks.php new file mode 100644 index 00000000..3bed6044 --- /dev/null +++ b/src/UGN/Params/AddRoutePolicyParamPolicySrcNetworks.php @@ -0,0 +1,64 @@ +get("NetworkId"); + } + + /** + * NetworkId: 路由策略需要匹配的路由的网络实例ID数组 + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Prefixes: 路由策略需要匹配的路由的网络实例下的网段数组 + * + * @return string[]|null + */ + public function getPrefixes() + { + return $this->get("Prefixes"); + } + + /** + * Prefixes: 路由策略需要匹配的路由的网络实例下的网段数组 + * + * @param string[] $prefixes + */ + public function setPrefixes(array $prefixes) + { + $this->set("Prefixes", $prefixes); + } +} diff --git a/src/UGN/Params/AttachUGNNetworksParamNetworks.php b/src/UGN/Params/AttachUGNNetworksParamNetworks.php new file mode 100644 index 00000000..1068027a --- /dev/null +++ b/src/UGN/Params/AttachUGNNetworksParamNetworks.php @@ -0,0 +1,104 @@ +get("NetworkID"); + } + + /** + * NetworkID: 网络实例 ID,如 uvnet-xxxx + * + * @param string $networkID + */ + public function setNetworkID($networkID) + { + $this->set("NetworkID", $networkID); + } + + /** + * Type: 网络实例类型,枚举值:VPC/UCVR/... + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 网络实例类型,枚举值:VPC/UCVR/... + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Region: 网络实例所属地域,如 cn-sh2 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 网络实例所属地域,如 cn-sh2 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * OrgName: 网络实例所属项目名,如 org-xxx + * + * @return string|null + */ + public function getOrgName() + { + return $this->get("OrgName"); + } + + /** + * OrgName: 网络实例所属项目名,如 org-xxx + * + * @param string $orgName + */ + public function setOrgName($orgName) + { + $this->set("OrgName", $orgName); + } +} diff --git a/src/UGN/Params/CreateUGNParamNetworks.php b/src/UGN/Params/CreateUGNParamNetworks.php new file mode 100644 index 00000000..600a4515 --- /dev/null +++ b/src/UGN/Params/CreateUGNParamNetworks.php @@ -0,0 +1,104 @@ +get("NetworkID"); + } + + /** + * NetworkID: 网络实例 ID,如 uvnet-xxxx + * + * @param string $networkID + */ + public function setNetworkID($networkID) + { + $this->set("NetworkID", $networkID); + } + + /** + * Type: 网络实例类型,枚举值:VPC/UCVR/... + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 网络实例类型,枚举值:VPC/UCVR/... + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Region: 网络实例所属地域,如 cn-sh2 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 网络实例所属地域,如 cn-sh2 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * OrgName: 网络实例所属项目名,如 org-xxx + * + * @return string|null + */ + public function getOrgName() + { + return $this->get("OrgName"); + } + + /** + * OrgName: 网络实例所属项目名,如 org-xxx + * + * @param string $orgName + */ + public function setOrgName($orgName) + { + $this->set("OrgName", $orgName); + } +} diff --git a/src/UGN/Params/UpdateRoutePolicyParamPolicy.php b/src/UGN/Params/UpdateRoutePolicyParamPolicy.php new file mode 100644 index 00000000..bc579c92 --- /dev/null +++ b/src/UGN/Params/UpdateRoutePolicyParamPolicy.php @@ -0,0 +1,268 @@ +get("PolicyId"); + } + + /** + * PolicyId: 路由策略ID + * + * @param string $policyId + */ + public function setPolicyId($policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * Name: 策略名称,限定长度 255 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 策略名称,限定长度 255 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Direction: 策略方向,限定取值:"In"/"Out" + * + * @return string|null + */ + public function getDirection() + { + return $this->get("Direction"); + } + + /** + * Direction: 策略方向,限定取值:"In"/"Out" + * + * @param string $direction + */ + public function setDirection($direction) + { + $this->set("Direction", $direction); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * RouteAction: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @return string|null + */ + public function getRouteAction() + { + return $this->get("RouteAction"); + } + + /** + * RouteAction: 策略执行动作,限定取值:"Permit"/"Deny" + * + * @param string $routeAction + */ + public function setRouteAction($routeAction) + { + $this->set("RouteAction", $routeAction); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @return integer|null + */ + public function getRoutePriority() + { + return $this->get("RoutePriority"); + } + + /** + * RoutePriority: 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * + * @param int $routePriority + */ + public function setRoutePriority($routePriority) + { + $this->set("RoutePriority", $routePriority); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @return string[]|null + */ + public function getSrcRegions() + { + return $this->get("SrcRegions"); + } + + /** + * SrcRegions: 路由策略需要匹配的路由的所在地域数组 + * + * @param string[] $srcRegions + */ + public function setSrcRegions(array $srcRegions) + { + $this->set("SrcRegions", $srcRegions); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @return string[]|null + */ + public function getSrcNetworkTypes() + { + return $this->get("SrcNetworkTypes"); + } + + /** + * SrcNetworkTypes: 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @param string[] $srcNetworkTypes + */ + public function setSrcNetworkTypes(array $srcNetworkTypes) + { + $this->set("SrcNetworkTypes", $srcNetworkTypes); + } + + /** + * SrcNetworks: + * + * @return UpdateRoutePolicyParamPolicySrcNetworks[]|null + */ + public function getSrcNetworks() + { + $items = $this->get("SrcNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateRoutePolicyParamPolicySrcNetworks($item)); + } + return $result; + } + + /** + * SrcNetworks: + * + * @param UpdateRoutePolicyParamPolicySrcNetworks[] $srcNetworks + */ + public function setSrcNetworks(array $srcNetworks) + { + $result = []; + foreach ($srcNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @return string[]|null + */ + public function getDstNetworkTypes() + { + return $this->get("DstNetworkTypes"); + } + + /** + * DstNetworkTypes: 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * + * @param string[] $dstNetworkTypes + */ + public function setDstNetworkTypes(array $dstNetworkTypes) + { + $this->set("DstNetworkTypes", $dstNetworkTypes); + } + + /** + * DstNetworks: + * + * @return UpdateRoutePolicyParamPolicyDstNetworks[]|null + */ + public function getDstNetworks() + { + $items = $this->get("DstNetworks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateRoutePolicyParamPolicyDstNetworks($item)); + } + return $result; + } + + /** + * DstNetworks: + * + * @param UpdateRoutePolicyParamPolicyDstNetworks[] $dstNetworks + */ + public function setDstNetworks(array $dstNetworks) + { + $result = []; + foreach ($dstNetworks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UGN/Params/UpdateRoutePolicyParamPolicyDstNetworks.php b/src/UGN/Params/UpdateRoutePolicyParamPolicyDstNetworks.php new file mode 100644 index 00000000..90a0fe54 --- /dev/null +++ b/src/UGN/Params/UpdateRoutePolicyParamPolicyDstNetworks.php @@ -0,0 +1,44 @@ +get("NetworkId"); + } + + /** + * NetworkId: 路由策略需要作用的网络实例ID数组 + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } +} diff --git a/src/UGN/Params/UpdateRoutePolicyParamPolicySrcNetworks.php b/src/UGN/Params/UpdateRoutePolicyParamPolicySrcNetworks.php new file mode 100644 index 00000000..2894f0f0 --- /dev/null +++ b/src/UGN/Params/UpdateRoutePolicyParamPolicySrcNetworks.php @@ -0,0 +1,64 @@ +get("NetworkId"); + } + + /** + * NetworkId: 路由策略需要匹配的路由的网络实例ID数组 + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Prefixes: 路由策略需要匹配的路由的网络实例下的网段数组 + * + * @return string[]|null + */ + public function getPrefixes() + { + return $this->get("Prefixes"); + } + + /** + * Prefixes: 路由策略需要匹配的路由的网络实例下的网段数组 + * + * @param string[] $prefixes + */ + public function setPrefixes(array $prefixes) + { + $this->set("Prefixes", $prefixes); + } +} diff --git a/src/UGN/UGNClient.php b/src/UGN/UGNClient.php index 24315cbc..f574e4ef 100644 --- a/src/UGN/UGNClient.php +++ b/src/UGN/UGNClient.php @@ -1,6 +1,6 @@ (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) 云联网实例ID + * "Policy" => (object) [ + * "Direction" => (string) 策略方向,限定取值:"In"/"Out" + * "Priority" => (integer) 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * "RouteAction" => (string) 策略执行动作,限定取值:"Permit"/"Deny" + * "SrcNetworks" => (array) [ + * [ + * "NetworkId" => (string) 路由策略需要匹配的路由的网络实例ID数组 + * "Prefixes" => (array) 路由策略需要匹配的路由的网络实例下的网段数组 + * ] + * ] + * "Name" => (string) 策略名称,限定长度255 + * "RoutePriority" => (integer) 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * "SrcRegions" => (array) 路由策略需要匹配的路由的所在地域数组 + * "SrcNetworkTypes" => (array) 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * "DstNetworkTypes" => (array) 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter","Direction" 为 "In" 时,该值无效 + * "DstNetworks" => (array) [ + * [ + * "NetworkId" => (string) 路由策略需要作用的网络实例ID数组,"Direction" 为 "In" 时,该值无效 + * ] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddRoutePolicyResponse + * @throws UCloudException + */ + public function addRoutePolicy(AddRoutePolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new AddRoutePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AttachUGNNetworks - 批量关联网络实例 + * + * See also: https://docs.ucloud.cn/api/ugn-api/attach_ugn_networks + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) UGN ID + * "Networks" => (array) [ + * [ + * "NetworkID" => (string) 网络实例 ID,如 uvnet-xxxx + * "Type" => (string) 网络实例类型,枚举值:VPC/UCVR/... + * "Region" => (string) 网络实例所属地域,如 cn-sh2 + * "OrgName" => (string) 网络实例所属项目名,如 org-xxx + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "Networks" => (array) 数组,数组内每个元素的字段如下: NetworkID:string,网络实例 ID,如 uvnet-xxxx; Type:string,网络实例类型,枚举值:VPC/UCVR/...; Region:string,网络实例所属地域,如 cn-sh2; OrgName:string,网络实例所属项目名,如 org-xxx[ + * [ + * "Region" => (string) 网络实例所在地域 + * "NetworkID" => (string) 网络实例的ID,如 vnet-xxxxx + * "Name" => (string) 网络实例名称 + * "Type" => (string) 网络实例类型:VPC/UCVR/... + * "OrgName" => (string) 网络实例所在项目名 + * "CompanyID" => (integer) 网络实例所属公司ID + * "RegionID" => (integer) 网络实例所在地域ID + * "OrgID" => (integer) 网络实例所在项目的ID + * "VNI" => (integer) 网络实例的唯一标识,如 vpc 的 tunnel_id + * "InsertTime" => (integer) 创建时间 + * ] + * ] + * "UGNID" => (string) UGN ID + * ] + * + * @return AttachUGNNetworksResponse + * @throws UCloudException + */ + public function attachUGNNetworks(AttachUGNNetworksRequest $request = null) + { + $resp = $this->invoke($request); + return new AttachUGNNetworksResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateSimpleUGNBwPackage - 云联网简洁版创建带宽包 + * + * See also: https://docs.ucloud.cn/api/ugn-api/create_simple_ugn_bw_package + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) ugn 资源 id + * "RegionA" => (string) 地域 A 名称 + * "RegionB" => (string) 地域 B 名称 + * "BandWidth" => (integer) 购买的带宽值 + * "PayMode" => (string) 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:后付费 + * "ChargeType" => (string) 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * "Quantity" => (number) 购买份数,主要用于预付费 + * "Name" => (string) 带宽包名称 + * "Remark" => (string) 备注 + * "Qos" => (string) 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * "Path" => (string) 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * "CouponId" => (string) 代金券 id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return CreateSimpleUGNBwPackageResponse + * @throws UCloudException + */ + public function createSimpleUGNBwPackage(CreateSimpleUGNBwPackageRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateSimpleUGNBwPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUGN - 创建云联网 + * + * See also: https://docs.ucloud.cn/api/ugn-api/create_ugn + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) UGN名称 + * "Remark" => (string) 备注 + * "Networks" => (array) [ + * [ + * "NetworkID" => (string) 网络实例 ID,如 uvnet-xxxx + * "Type" => (string) 网络实例类型,枚举值:VPC/UCVR/... + * "Region" => (string) 网络实例所属地域,如 cn-sh2 + * "OrgName" => (string) 网络实例所属项目名,如 org-xxx + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "UGNID" => (string) UGN ID + * "Networks" => (array) 网络实例列表[ + * [ + * "Region" => (string) 网络实例所在地域 + * "NetworkID" => (string) 网络实例的ID,如 vnet-xxxxx + * "Name" => (string) 网络实例名称 + * "Type" => (string) 网络实例类型:VPC/UCVR/... + * "OrgName" => (string) 网络实例所在项目名 + * "CompanyID" => (integer) 网络实例所属公司ID + * "RegionID" => (integer) 网络实例所在地域ID + * "OrgID" => (integer) 网络实例所在项目的ID + * "VNI" => (integer) 网络实例的唯一标识,如 vpc 的 tunnel_id + * "InsertTime" => (integer) 创建时间 + * ] + * ] + * ] + * + * @return CreateUGNResponse + * @throws UCloudException + */ + public function createUGN(CreateUGNRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUGNResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DelUGN - 删除云联网,仅云联网内无带宽包或网络实例时才可以被删除 + * + * See also: https://docs.ucloud.cn/api/ugn-api/del_ugn + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) UGNID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DelUGNResponse + * @throws UCloudException + */ + public function delUGN(DelUGNRequest $request = null) + { + $resp = $this->invoke($request); + return new DelUGNResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteRoutePolicy - 删除路由策略 + * + * See also: https://docs.ucloud.cn/api/ugn-api/delete_route_policy + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) 云联网实例ID + * "PolicyIds" => (array) 需要删除的路由策略ID数组 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteRoutePolicyResponse + * @throws UCloudException + */ + public function deleteRoutePolicy(DeleteRoutePolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteRoutePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUGNBwPackage - 删除带宽包,互通地域仅保留默认带宽包 + * + * See also: https://docs.ucloud.cn/api/ugn-api/delete_ugn_bw_package + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BwPackageID" => (string) 带宽包ID + * "UGNID" => (string) UGNID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUGNBwPackageResponse + * @throws UCloudException + */ + public function deleteUGNBwPackage(DeleteUGNBwPackageRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUGNBwPackageResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeSimpleUGN - 获取简洁版UGN详情 * @@ -50,15 +343,17 @@ class UGNClient extends Client * Outputs: * * $outputs = [ - * "UGN" => (object) [ + * "UGN" => (object) 云联网实例基本信息[ * "UGNID" => (string) 云联网资源 ID * "Name" => (string) 云联网名称 * "Remark" => (string) 云联网备注 * "CreateTime" => (integer) 云联网创建时间 * "NetworkCount" => (integer) 关联网络实例数量 * "BwPackageCount" => (integer) 绑定带宽包数量 + * "PolicyCount" => (integer) 关联的路由策略数量 + * "ApplyNetworksCount" => (integer) 申请待加入的网络数量 * ] - * "Networks" => (array) [ + * "Networks" => (array) 加入云联网网络实例基本信息[ * [ * "Region" => (string) 网络实例所在地域 * "NetworkID" => (string) 网络实例的ID,如 vnet-xxxxx @@ -70,10 +365,10 @@ class UGNClient extends Client * "CreateTime" => (integer) * ] * ] - * "BwPackages" => (array) [ + * "BwPackages" => (array) 云联网下的带宽基本信息[ * [ - * "PackageID" => (string) - * "UGNID" => (string) + * "PackageID" => (string) 带宽包 ID + * "UGNID" => (string) UGN ID * "PayMode" => (string) 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费 * "RegionA" => (string) 地域A名称 * "RegionB" => (string) 地域B名称 @@ -81,15 +376,15 @@ class UGNClient extends Client * "Qos" => (string) 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金 * "Path" => (string) 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本 * "CreateTime" => (integer) 创建时间 - * "Name" => (string) - * "Remark" => (string) + * "Name" => (string) 带宽包名称 + * "Remark" => (string) 备注 * "ExpireTime" => (integer) 过期时间 * "ChangeStatus" => (integer) 带宽包切换状态 * "ChangeTime" => (integer) 带宽包切换时间 * "ChangePayMode" => (string) 带宽包切换计费类型 * ] * ] - * "Routes" => (array) [ + * "Routes" => (array) 云联网下的路由基本信息[ * [ * "DstAddr" => (string) 目的网段 * "NextHopID" => (string) 下一跳网络实例 ID @@ -97,6 +392,42 @@ class UGNClient extends Client * "NextHopRegion" => (string) 下一跳网络实例所属地域 * "NextHopRegionID" => (integer) 下一跳网络实例所属地域 id * "Priority" => (integer) 路由优先级 + * "Deny" => (boolean) true: 由于命中路由策略而失效 + * "Restrict" => (boolean) true: 由于优先级比其他前缀相同的路由低而失效 + * "Conflict" => (boolean) true: 由于优先级相同但插入数据库的时间比其他前缀相同的路由晚而失效 + * "InPolicyId" => (string) 匹配中的入向路由策略id + * "InPolicyName" => (string) 匹配中的入向路由策略名称 + * "OutPolicyId" => (string) 匹配中的出向路由策略id + * "OutPolicyName" => (string) 匹配中的出向路由策略名称 + * ] + * ] + * "Policies" => (array) 云联网的路由策略基本信息[ + * [ + * "Region" => (string) 作用地域 + * "PolicyId" => (string) 路由策略ID + * "Name" => (string) 路由策略名称,限定长度255 + * "Direction" => (string) 策略方向,限定取值:"In"/"Out" + * "Enabled" => (boolean) 是否启用 + * "Priority" => (integer) 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * "Action" => (string) 策略执行动作,限定取值:"Permit"/"Deny" + * "RoutePriority" => (integer) 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * "SrcRegions" => (array) 路由策略需要匹配的路由的所在地域数组 + * "SrcNetworkTypes" => (array) 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * "SrcNetworks" => (array) 路由策略需要匹配的路由的网络实例类型以及该实例下的网段信息[ + * [ + * "NetworkId" => (string) 网络实例ID + * "Prefixes" => (array) 网络实例上报的网段 + * ] + * ] + * "DstNetworkTypes" => (array) 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * "DstNetworks" => (array) 路由策略需要作用的网络实例ID[ + * [ + * "NetworkId" => (string) 网络实例ID + * "Prefixes" => (array) 网络实例上报的网段 + * ] + * ] + * "CreateTime" => (integer) 创建时间 + * "Matched" => (boolean) 是否匹配中路由 * ] * ] * ] @@ -110,6 +441,111 @@ public function describeSimpleUGN(DescribeSimpleUGNRequest $request = null) return new DescribeSimpleUGNResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DetachUGNNetworks - 批量解除关联网络实例 + * + * See also: https://docs.ucloud.cn/api/ugn-api/detach_ugn_networks + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) UGNID + * "Networks" => (array) 网络实例 ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Networks" => (array) 数组,数组内每个元素的字段如下: NetworkID:string,网络实例 ID,如 uvnet-xxxx; Type:string,网络实例类型,枚举值:VPC/UCVR/...; Region:string,网络实例所属地域,如 cn-sh2; OrgName:string,网络实例所属项目名,如 org-xxx[ + * [ + * "Region" => (string) 网络实例所在地域 + * "NetworkID" => (string) 网络实例的ID,如 vnet-xxxxx + * "Name" => (string) 网络实例名称 + * "Type" => (string) 网络实例类型:VPC/UCVR/... + * "OrgName" => (string) 网络实例所在项目名 + * "CompanyID" => (integer) 网络实例所属公司ID + * "RegionID" => (integer) 网络实例所在地域ID + * "OrgID" => (integer) 网络实例所在项目的ID + * "VNI" => (integer) 网络实例的唯一标识,如 vpc 的 tunnel_id + * "InsertTime" => (integer) 创建时间 + * ] + * ] + * "UGNID" => (string) UGN ID + * ] + * + * @return DetachUGNNetworksResponse + * @throws UCloudException + */ + public function detachUGNNetworks(DetachUGNNetworksRequest $request = null) + { + $resp = $this->invoke($request); + return new DetachUGNNetworksResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * EnableRoutePolicy - 启用\停用路由策略 + * + * See also: https://docs.ucloud.cn/api/ugn-api/enable_route_policy + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) 云联网实例ID + * "PolicyId" => (string) 路由策略ID + * "Enable" => (boolean) 是否启用 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return EnableRoutePolicyResponse + * @throws UCloudException + */ + public function enableRoutePolicy(EnableRoutePolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new EnableRoutePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetSimpleBuyBwPrice - 获取简洁版带宽包价格 + * + * See also: https://docs.ucloud.cn/api/ugn-api/get_simple_buy_bw_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "RegionA" => (string) 地域 A 名称 + * "RegionB" => (string) 地域 B 名称 + * "PayMode" => (string) 计费模式 FixedBw:固定带宽|Max5:第五峰值|Traffic:流量计费 固定带宽:按月/按年 Max5:后付费 流量计费:按量付费 + * "ChargeType" => (string) 付费方式 Month:按月|Year:按年|PostPay:后付费|Count:按量 + * "Qos" => (string) 服务质量 Diamond:钻石|Platinum:铂金|Gold:黄金 + * "Path" => (string) 智能路径 Delay:最低时延|IGP:普通线路|TCO:最低成本 + * "BandWidth" => (integer) 购买的带宽值,默认为1 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalPrice" => (integer) 最终价格 = 原价 * 用户折扣 * 产品折扣 + * "CustomPrice" => (integer) 客户折扣价 = 原价 * 用户折扣 + * "OriginalPrice" => (integer) 原价 + * ] + * + * @return GetSimpleBuyBwPriceResponse + * @throws UCloudException + */ + public function getSimpleBuyBwPrice(GetSimpleBuyBwPriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetSimpleBuyBwPriceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetSimpleUGNBwPackages - 获取指定云联网内的带宽包 * @@ -119,18 +555,19 @@ public function describeSimpleUGN(DescribeSimpleUGNRequest $request = null) * * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "UGNID" => (string) + * "UGNID" => (string) UGN ID * "Offset" => (integer) 偏移量,默认0 * "Limit" => (integer) 分页大小,默认20 + * "PackageIds" => (array) 带宽包ID列表,不填查询UGN下全部带宽包 * ] * * Outputs: * * $outputs = [ - * "BwPackages" => (array) [ + * "BwPackages" => (array) 带宽包列表[ * [ - * "PackageID" => (string) - * "UGNID" => (string) + * "PackageID" => (string) 带宽包 ID + * "UGNID" => (string) UGN ID * "PayMode" => (string) 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费 * "RegionA" => (string) 地域A名称 * "RegionB" => (string) 地域B名称 @@ -138,17 +575,17 @@ public function describeSimpleUGN(DescribeSimpleUGNRequest $request = null) * "Qos" => (string) 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金 * "Path" => (string) 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本 * "CreateTime" => (integer) 创建时间 - * "Name" => (string) - * "Remark" => (string) + * "Name" => (string) 带宽包名称 + * "Remark" => (string) 备注 * "ExpireTime" => (integer) 过期时间 * "ChangeStatus" => (integer) 带宽包切换状态 * "ChangeTime" => (integer) 带宽包切换时间 * "ChangePayMode" => (string) 带宽包切换计费类型 * ] * ] - * "TotalCount" => (integer) - * "Offset" => (integer) - * "Limit" => (integer) + * "TotalCount" => (integer) 带宽包数量 + * "Offset" => (integer) 偏移量 + * "Limit" => (integer) 分页大小 * ] * * @return GetSimpleUGNBwPackagesResponse @@ -160,6 +597,100 @@ public function getSimpleUGNBwPackages(GetSimpleUGNBwPackagesRequest $request = return new GetSimpleUGNBwPackagesResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetSwitchableBillingModes - 获取带宽包可以切换的计费类型 + * + * See also: https://docs.ucloud.cn/api/ugn-api/get_switchable_billing_modes + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BwPackageID" => (string) 带宽包 id + * ] + * + * Outputs: + * + * $outputs = [ + * "PayModes" => (array) 支持的计费类型。FixedBw:固定带宽,Traffic:流量计费,Max5:第五峰值。 + * ] + * + * @return GetSwitchableBillingModesResponse + * @throws UCloudException + */ + public function getSwitchableBillingModes(GetSwitchableBillingModesRequest $request = null) + { + $resp = $this->invoke($request); + return new GetSwitchableBillingModesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUGNRouteTable - 获取云联网路由表 + * + * See also: https://docs.ucloud.cn/api/ugn-api/get_ugn_route_table + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) 云联网实例ID + * "Type" => (string) 路由表类型,分为初始路由表、中阶路由表以及最终路由表,限定取值:"Origin"/"Middle"/"Final" + * ] + * + * Outputs: + * + * $outputs = [ + * "UGNID" => (string) 云联网实例ID + * "Routes" => (array) 路由表,"Origin"/"Middle" 用这个[ + * [ + * "DstAddr" => (string) 目的网段 + * "NextHopID" => (string) 下一跳网络实例 ID + * "NextHopType" => (string) 下一跳网络实例类型 + * "NextHopRegion" => (string) 下一跳网络实例所属地域 + * "NextHopRegionID" => (integer) 下一跳网络实例所属地域 id + * "Priority" => (integer) 路由优先级 + * "Deny" => (boolean) true: 由于命中路由策略而失效 + * "Restrict" => (boolean) true: 由于优先级比其他前缀相同的路由低而失效 + * "Conflict" => (boolean) true: 由于优先级相同但插入数据库的时间比其他前缀相同的路由晚而失效 + * "InPolicyId" => (string) 匹配中的入向路由策略id + * "InPolicyName" => (string) 匹配中的入向路由策略名称 + * "OutPolicyId" => (string) 匹配中的出向路由策略id + * "OutPolicyName" => (string) 匹配中的出向路由策略名称 + * ] + * ] + * "VRoutes" => (array) 网络实例对应的路由表,"Final" 用这个[ + * [ + * "NetworkId" => (string) 网络实例ID + * "Routes" => (array) 该网络实例对应的路由[ + * [ + * "DstAddr" => (string) 目的网段 + * "NextHopID" => (string) 下一跳网络实例 ID + * "NextHopType" => (string) 下一跳网络实例类型 + * "NextHopRegion" => (string) 下一跳网络实例所属地域 + * "NextHopRegionID" => (integer) 下一跳网络实例所属地域 id + * "Priority" => (integer) 路由优先级 + * "Deny" => (boolean) true: 由于命中路由策略而失效 + * "Restrict" => (boolean) true: 由于优先级比其他前缀相同的路由低而失效 + * "Conflict" => (boolean) true: 由于优先级相同但插入数据库的时间比其他前缀相同的路由晚而失效 + * "InPolicyId" => (string) 匹配中的入向路由策略id + * "InPolicyName" => (string) 匹配中的入向路由策略名称 + * "OutPolicyId" => (string) 匹配中的出向路由策略id + * "OutPolicyName" => (string) 匹配中的出向路由策略名称 + * ] + * ] + * ] + * ] + * ] + * + * @return GetUGNRouteTableResponse + * @throws UCloudException + */ + public function getUGNRouteTable(GetUGNRouteTableRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUGNRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ListSimpleBwPackage - 获取当前项目下的带宽包列表 * @@ -169,20 +700,20 @@ public function getSimpleUGNBwPackages(GetSimpleUGNBwPackagesRequest $request = * * $args = [ * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "Offset" => (integer) - * "Limit" => (integer) + * "Offset" => (integer) 偏移量,默认0 + * "Limit" => (integer) 分页大小,默认20 * ] * * Outputs: * * $outputs = [ - * "TotalCount" => (integer) - * "Offset" => (integer) - * "Limit" => (integer) - * "BwPackages" => (array) [ + * "TotalCount" => (integer) 带宽包数量 + * "Offset" => (integer) 偏移量 + * "Limit" => (integer) 分页大小 + * "BwPackages" => (array) 带宽包列表[ * [ - * "PackageID" => (string) - * "UGNID" => (string) + * "PackageID" => (string) 带宽包 ID + * "UGNID" => (string) UGN ID * "PayMode" => (string) 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费 * "RegionA" => (string) 地域A名称 * "RegionB" => (string) 地域B名称 @@ -190,8 +721,8 @@ public function getSimpleUGNBwPackages(GetSimpleUGNBwPackagesRequest $request = * "Qos" => (string) 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金 * "Path" => (string) 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本 * "CreateTime" => (integer) 创建时间 - * "Name" => (string) - * "Remark" => (string) + * "Name" => (string) 带宽包名称 + * "Remark" => (string) 备注 * "ExpireTime" => (integer) 过期时间 * "ChangeStatus" => (integer) 带宽包切换状态 * "ChangeTime" => (integer) 带宽包切换时间 @@ -225,7 +756,7 @@ public function listSimpleBwPackage(ListSimpleBwPackageRequest $request = null) * Outputs: * * $outputs = [ - * "UGNs" => (array) [ + * "UGNs" => (array) UGN 列表[ * [ * "UGNID" => (string) 云联网资源 ID * "Name" => (string) 云联网名称 @@ -233,11 +764,13 @@ public function listSimpleBwPackage(ListSimpleBwPackageRequest $request = null) * "CreateTime" => (integer) 云联网创建时间 * "NetworkCount" => (integer) 关联网络实例数量 * "BwPackageCount" => (integer) 绑定带宽包数量 + * "PolicyCount" => (integer) 关联的路由策略数量 + * "ApplyNetworksCount" => (integer) 申请待加入的网络数量 * ] * ] - * "TotalCount" => (integer) - * "Offset" => (integer) - * "Limit" => (integer) + * "TotalCount" => (integer) UGN数量 + * "Offset" => (integer) 偏移量 + * "Limit" => (integer) 分页大小 * ] * * @return ListUGNResponse @@ -249,6 +782,40 @@ public function listUGN(ListUGNRequest $request = null) return new ListUGNResponse($resp->toArray(), $resp->getRequestId()); } + /** + * ListUGNRegions - 获取UGN的可加入地域列表 + * + * See also: https://docs.ucloud.cn/api/ugn-api/list_ugn_regions + * + * Arguments: + * + * $args = [ + * "SelectedRegions" => (array) 数组,已选区域,例如:cn-bj2, cn-wlcb + * ] + * + * Outputs: + * + * $outputs = [ + * "RegionLIst" => (array) 可加入地域列表[ + * [ + * "Region" => (string) 地域名称 + * "RegIonId" => (integer) 地域ID + * "IsOverseas" => (boolean) 是否为海外地域 + * "IsOnline" => (boolean) 是否上线 + * "Needs" => (array) 添加region需要做的校验 + * ] + * ] + * ] + * + * @return ListUGNRegionsResponse + * @throws UCloudException + */ + public function listUGNRegions(ListUGNRegionsRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUGNRegionsResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ModifyUGNBandwidth - 修改云联网带宽大小 * @@ -276,4 +843,85 @@ public function modifyUGNBandwidth(ModifyUGNBandwidthRequest $request = null) $resp = $this->invoke($request); return new ModifyUGNBandwidthResponse($resp->toArray(), $resp->getRequestId()); } + + /** + * SendUGNApplyNetwork - 跨账号网络实例申请加入 UGN + * + * See also: https://docs.ucloud.cn/api/ugn-api/send_ugn_apply_network + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NetworkID" => (string) 网络实例 ID,如 uvnet-xxxx + * "NetworkType" => (string) 网络实例类型,枚举值:VPC/UWAN-VRouter/... + * "NetworkRegion" => (string) 网络实例所属地域,如 cn-sh2 + * "NetworkOrgName" => (string) 网络实例所属项目名,如 org-xxx + * "UGNID" => (string) UGN id + * "UGNCompanyID" => (integer) UGN所属公司 id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return SendUGNApplyNetworkResponse + * @throws UCloudException + */ + public function sendUGNApplyNetwork(SendUGNApplyNetworkRequest $request = null) + { + $resp = $this->invoke($request); + return new SendUGNApplyNetworkResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateRoutePolicy - 修改路由策略 + * + * See also: https://docs.ucloud.cn/api/ugn-api/update_route_policy + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UGNID" => (string) 云联网实例ID + * "Policy" => (object) [ + * "PolicyId" => (string) 路由策略ID + * "Name" => (string) 策略名称,限定长度 255 + * "Direction" => (string) 策略方向,限定取值:"In"/"Out" + * "Priority" => (integer) 策略优先级,范围:[1,255],数值越小优先级越大,同一方向,策略优先级不可重复 + * "RouteAction" => (string) 策略执行动作,限定取值:"Permit"/"Deny" + * "RoutePriority" => (integer) 当执行动作为 "Permit" 时,给匹配中的路由设置路由优先级,范围:[1,255],数值越小优先级越大 + * "SrcRegions" => (array) 路由策略需要匹配的路由的所在地域数组 + * "SrcNetworkTypes" => (array) 路由策略需要匹配的路由的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * "SrcNetworks" => (array) [ + * [ + * "NetworkId" => (string) 路由策略需要匹配的路由的网络实例ID数组 + * "Prefixes" => (array) 路由策略需要匹配的路由的网络实例下的网段数组 + * ] + * ] + * "DstNetworkTypes" => (array) 路由策略需要作用的网络实例类型数组,限定取值:"VPC" / "UWAN-VRouter" + * "DstNetworks" => (array) [ + * [ + * "NetworkId" => (string) 路由策略需要作用的网络实例ID数组 + * ] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateRoutePolicyResponse + * @throws UCloudException + */ + public function updateRoutePolicy(UpdateRoutePolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateRoutePolicyResponse($resp->toArray(), $resp->getRequestId()); + } }