Skip to content

Commit 1a2fcb4

Browse files
author
fengyikai
committed
虚拟私有网络(vpc):修复部分bug
1 parent d3eb6f1 commit 1a2fcb4

52 files changed

Lines changed: 1123 additions & 30 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ksyun/ksyun-sdk-php",
3-
"version": "1.7.71",
3+
"version": "1.7.72",
44
"description": "ksyun OpenApi php sdk",
55
"type": "library",
66
"homepage": "https://github.com/kingsoftcloud/sdk-php",

src/Ksyun/Client/Vpc/V20160304/Models/ActiveFlowLogResponse.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class ActiveFlowLogResponse extends BaseModel
3838
/** 创建时间**/
3939
public $CreateTime;
4040

41+
/** 状态**/
42+
public $Status;
43+
4144
public function __construct()
4245
{
4346

@@ -81,6 +84,9 @@ public function unserialize($param)
8184
if (array_key_exists("CreateTime",$param) and $param["CreateTime"] !== null) {
8285
$this->CreateTime = $param["CreateTime"];
8386
}
87+
if (array_key_exists("Status",$param) and $param["Status"] !== null) {
88+
$this->Status = $param["Status"];
89+
}
8490

8591
}
8692
}

src/Ksyun/Client/Vpc/V20160304/Models/AddNatIpRequest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class AddNatIpRequest extends BaseModel
1111
"NatId" => null,
1212
/**Int**/
1313
"AddNumber" => null,
14+
/**String**/
15+
"NatIp" => null,
1416
];
1517

1618

@@ -38,6 +40,13 @@ public function setParams($param = [])
3840
$this->RequestParams["AddNumber"] = $param["AddNumber"];
3941
}
4042
}
43+
if (array_key_exists("NatIp",$param) and $param["NatIp"] !== null) {
44+
if(is_bool($param["NatIp"])){
45+
$this->RequestParams["NatIp"] = $param["NatIp"] ? "true" : "false";
46+
} else {
47+
$this->RequestParams["NatIp"] = $param["NatIp"];
48+
}
49+
}
4150

4251
}
4352

src/Ksyun/Client/Vpc/V20160304/Models/AddNatIpResponse.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ class AddNatIpResponse extends BaseModel
5959
/**Object Dnat的信息**/
6060
public $DnatSet;
6161

62+
/**Object 资源所绑定的标签信息**/
63+
public $TagSet;
64+
65+
/** Nat版本**/
66+
public $NatVersion;
67+
68+
/** Nat线路ID**/
69+
public $NatLineId;
70+
71+
/**Object 绑定的EIP信息**/
72+
public $FloatingIpSet;
73+
6274
public function __construct()
6375
{
6476

@@ -123,6 +135,18 @@ public function unserialize($param)
123135
if (array_key_exists("DnatSet",$param) and $param["DnatSet"] !== null) {
124136
$this->DnatSet = $param["DnatSet"];
125137
}
138+
if (array_key_exists("TagSet",$param) and $param["TagSet"] !== null) {
139+
$this->TagSet = $param["TagSet"];
140+
}
141+
if (array_key_exists("NatVersion",$param) and $param["NatVersion"] !== null) {
142+
$this->NatVersion = $param["NatVersion"];
143+
}
144+
if (array_key_exists("NatLineId",$param) and $param["NatLineId"] !== null) {
145+
$this->NatLineId = $param["NatLineId"];
146+
}
147+
if (array_key_exists("FloatingIpSet",$param) and $param["FloatingIpSet"] !== null) {
148+
$this->FloatingIpSet = $param["FloatingIpSet"];
149+
}
126150

127151
}
128152
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
namespace Ksyun\Client\Vpc\V20160304\Models;
3+
4+
use Ksyun\Common\BaseModel;
5+
use Ksyun\Common\Http\HttpOptions;
6+
7+
class AssociateEipRequest extends BaseModel
8+
{
9+
public $RequestParams = [
10+
/**String**/
11+
"NatId" => null,
12+
];
13+
14+
/**特殊参数类型:Filter**/
15+
public $FloatingIpIds = [];
16+
17+
public function __construct(HttpOptions $httpOptions)
18+
{
19+
$httpOptions->setHeaderContentType("application/x-www-form-urlencoded");
20+
}
21+
22+
public function setParams($param = [])
23+
{
24+
if ($param === null) {
25+
return;
26+
}
27+
if (array_key_exists("NatId",$param) and $param["NatId"] !== null) {
28+
if(is_bool($param["NatId"])){
29+
$this->RequestParams["NatId"] = $param["NatId"] ? "true" : "false";
30+
} else {
31+
$this->RequestParams["NatId"] = $param["NatId"];
32+
}
33+
}
34+
if (array_key_exists("FloatingIpIds",$param) and $param["FloatingIpIds"] !== null) {
35+
$res = $this->formatFilterParams("FloatingIpIds",$param["FloatingIpIds"]);
36+
$this->_unserialize("FloatingIpIds",$res);
37+
}
38+
39+
}
40+
41+
private function _unserialize($name,$params)
42+
{
43+
if ($params === null) {
44+
return;
45+
}
46+
foreach ($params as $key => $value){
47+
$this->$name[$key] = $value;
48+
}
49+
50+
}
51+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
namespace Ksyun\Client\Vpc\V20160304\Models;
3+
4+
use Ksyun\Common\BaseModel;
5+
6+
class AssociateEipResponse extends BaseModel
7+
{
8+
/** **/
9+
public $RequestId;
10+
11+
public function __construct()
12+
{
13+
14+
}
15+
16+
public function unserialize($param)
17+
{
18+
if ($param === null) {
19+
return;
20+
}
21+
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
22+
$this->RequestId = $param["RequestId"];
23+
}
24+
25+
}
26+
}

src/Ksyun/Client/Vpc/V20160304/Models/AuthorizeSecurityGroupEntryRequest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class AuthorizeSecurityGroupEntryRequest extends BaseModel
3131
"Priority" => null,
3232
/**String**/
3333
"Policy" => null,
34+
/**String**/
35+
"AuthorizedSecurityGroupId" => null,
3436
];
3537

3638

@@ -128,6 +130,13 @@ public function setParams($param = [])
128130
$this->RequestParams["Policy"] = $param["Policy"];
129131
}
130132
}
133+
if (array_key_exists("AuthorizedSecurityGroupId",$param) and $param["AuthorizedSecurityGroupId"] !== null) {
134+
if(is_bool($param["AuthorizedSecurityGroupId"])){
135+
$this->RequestParams["AuthorizedSecurityGroupId"] = $param["AuthorizedSecurityGroupId"] ? "true" : "false";
136+
} else {
137+
$this->RequestParams["AuthorizedSecurityGroupId"] = $param["AuthorizedSecurityGroupId"];
138+
}
139+
}
131140

132141
}
133142

src/Ksyun/Client/Vpc/V20160304/Models/BatchCreateNatRateLimitResponse.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class BatchCreateNatRateLimitResponse extends BaseModel
1111
/** **/
1212
public $NatRateLimit;
1313

14+
/** 操作是否成功**/
15+
public $Return;
16+
1417
public function __construct()
1518
{
1619

@@ -27,6 +30,9 @@ public function unserialize($param)
2730
if (array_key_exists("NatRateLimit",$param) and $param["NatRateLimit"] !== null) {
2831
$this->NatRateLimit = $param["NatRateLimit"];
2932
}
33+
if (array_key_exists("Return",$param) and $param["Return"] !== null) {
34+
$this->Return = $param["Return"];
35+
}
3036

3137
}
3238
}

src/Ksyun/Client/Vpc/V20160304/Models/BatchModifyNatRateLimitRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class BatchModifyNatRateLimitRequest extends BaseModel
88
{
99
public $RequestParams = [
10-
/**String**/
10+
/**Int**/
1111
"BandwidthLimit" => null,
1212
/**Int**/
1313
"InBandwidthLimit" => null,

src/Ksyun/Client/Vpc/V20160304/Models/BatchModifyNatRateLimitResponse.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class BatchModifyNatRateLimitResponse extends BaseModel
1111
/** **/
1212
public $NatRateLimit;
1313

14+
/** 操作是否成功**/
15+
public $Return;
16+
1417
public function __construct()
1518
{
1619

@@ -27,6 +30,9 @@ public function unserialize($param)
2730
if (array_key_exists("NatRateLimit",$param) and $param["NatRateLimit"] !== null) {
2831
$this->NatRateLimit = $param["NatRateLimit"];
2932
}
33+
if (array_key_exists("Return",$param) and $param["Return"] !== null) {
34+
$this->Return = $param["Return"];
35+
}
3036

3137
}
3238
}

0 commit comments

Comments
 (0)