Skip to content

Commit c690672

Browse files
yangzong18huiguangjun
authored andcommitted
routing rule supports more parameters
1 parent 4fe3c63 commit c690672

File tree

12 files changed

+940
-1
lines changed

12 files changed

+940
-1
lines changed

src/Models/MirrorAuth.php

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class MirrorAuth
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'MirrorAuth')]
16+
final class MirrorAuth extends Model
17+
{
18+
/**
19+
* The authentication type.
20+
* @var string|null
21+
*/
22+
#[XmlElement(rename: 'AuthType', type: 'string')]
23+
public ?string $authType;
24+
25+
/**
26+
* The sign region for signature.
27+
* @var string|null
28+
*/
29+
#[XmlElement(rename: 'Region', type: 'string')]
30+
public ?string $region;
31+
32+
/**
33+
* The access key id for signature.
34+
* @var string|null
35+
*/
36+
#[XmlElement(rename: 'AccessKeyId', type: 'string')]
37+
public ?string $accessKeyId;
38+
39+
/**
40+
* The access key secret for signature.
41+
* @var string|null
42+
*/
43+
#[XmlElement(rename: 'AccessKeySecret', type: 'string')]
44+
public ?string $accessKeySecret;
45+
46+
/**
47+
* MirrorAuth constructor.
48+
* @param string|null $authType The authentication type.
49+
* @param string|null $region The sign region for signature.
50+
* @param string|null $accessKeyId The access key id for signature.
51+
* @param string|null $accessKeySecret The access key secret for signature.
52+
*/
53+
public function __construct(
54+
?string $authType = null,
55+
?string $region = null,
56+
?string $accessKeyId = null,
57+
?string $accessKeySecret = null
58+
)
59+
{
60+
$this->authType = $authType;
61+
$this->region = $region;
62+
$this->accessKeyId = $accessKeyId;
63+
$this->accessKeySecret = $accessKeySecret;
64+
}
65+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class MirrorMultiAlternate
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'MirrorMultiAlternate')]
16+
final class MirrorMultiAlternate extends Model
17+
{
18+
/**
19+
* The distinct number of a specific origin.
20+
* @var int|null
21+
*/
22+
#[XmlElement(rename: 'MirrorMultiAlternateNumber', type: 'int')]
23+
public ?int $mirrorMultiAlternateNumber;
24+
25+
/**
26+
* The URL for a specific origin.
27+
* @var string|null
28+
*/
29+
#[XmlElement(rename: 'MirrorMultiAlternateURL', type: 'string')]
30+
public ?string $mirrorMultiAlternateURL;
31+
32+
/**
33+
* The VPC ID for a specific origin.
34+
* @var string|null
35+
*/
36+
#[XmlElement(rename: 'MirrorMultiAlternateVpcId', type: 'string')]
37+
public ?string $mirrorMultiAlternateVpcId;
38+
39+
/**
40+
* The region for a specific origin.
41+
* @var string|null
42+
*/
43+
#[XmlElement(rename: 'MirrorMultiAlternateDstRegion', type: 'string')]
44+
public ?string $mirrorMultiAlternateDstRegion;
45+
46+
/**
47+
* MirrorMultiAlternate constructor.
48+
* @param int|null $mirrorMultiAlternateNumber The distinct number of a specific origin.
49+
* @param string|null $mirrorMultiAlternateURL The URL for a specific origin.
50+
* @param string|null $mirrorMultiAlternateVpcId The VPC ID for a specific origin.
51+
* @param string|null $mirrorMultiAlternateDstRegion The region for a specific origin.
52+
*/
53+
public function __construct(
54+
?int $mirrorMultiAlternateNumber = null,
55+
?string $mirrorMultiAlternateURL = null,
56+
?string $mirrorMultiAlternateVpcId = null,
57+
?string $mirrorMultiAlternateDstRegion = null
58+
)
59+
{
60+
$this->mirrorMultiAlternateNumber = $mirrorMultiAlternateNumber;
61+
$this->mirrorMultiAlternateURL = $mirrorMultiAlternateURL;
62+
$this->mirrorMultiAlternateVpcId = $mirrorMultiAlternateVpcId;
63+
$this->mirrorMultiAlternateDstRegion = $mirrorMultiAlternateDstRegion;
64+
}
65+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class MirrorMultiAlternates
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'MirrorMultiAlternates')]
16+
final class MirrorMultiAlternates extends Model
17+
{
18+
/**
19+
* The configuration list for multiple origins.
20+
* @var array<MirrorMultiAlternate>|null
21+
*/
22+
#[XmlElement(rename: 'MirrorMultiAlternate', type: MirrorMultiAlternate::class)]
23+
public ?array $mirrorMultiAlternates;
24+
25+
/**
26+
* MirrorMultiAlternates constructor.
27+
* @param array<MirrorMultiAlternate>|null $mirrorMultiAlternates The configuration list for multiple origins.
28+
*/
29+
public function __construct(
30+
?array $mirrorMultiAlternates = null
31+
)
32+
{
33+
$this->mirrorMultiAlternates = $mirrorMultiAlternates;
34+
}
35+
}

src/Models/MirrorReturnHeaders.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class MirrorReturnHeaders
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'MirrorReturnHeaders')]
16+
final class MirrorReturnHeaders extends Model
17+
{
18+
/**
19+
* The rule list for setting response headers in mirror-based back-to-origin.
20+
* @var array<ReturnHeader>|null
21+
*/
22+
#[XmlElement(rename: 'ReturnHeader', type: ReturnHeader::class)]
23+
public ?array $returnHeaders;
24+
25+
/**
26+
* MirrorReturnHeaders constructor.
27+
* @param array<ReturnHeader>|null $returnHeaders The rule list for setting response headers in mirror-based back-to-origin.
28+
*/
29+
public function __construct(
30+
?array $returnHeaders = null
31+
)
32+
{
33+
$this->returnHeaders = $returnHeaders;
34+
}
35+
}

src/Models/MirrorTagging.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class Taggings
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'Taggings')]
16+
final class MirrorTagging extends Model
17+
{
18+
/**
19+
* The rule for setting tag value for a specific tag key.
20+
* @var string|null
21+
*/
22+
#[XmlElement(rename: 'Value', type: 'string')]
23+
public ?string $value;
24+
25+
/**
26+
* The tag key.
27+
* @var string|null
28+
*/
29+
#[XmlElement(rename: 'Key', type: 'string')]
30+
public ?string $key;
31+
32+
/**
33+
* Taggings constructor.
34+
* @param string|null $value The rule for setting tag value for a specific tag key.
35+
* @param string|null $key The tag key.
36+
*/
37+
public function __construct(
38+
?string $value = null,
39+
?string $key = null
40+
)
41+
{
42+
$this->value = $value;
43+
$this->key = $key;
44+
}
45+
}

src/Models/MirrorTaggings.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class MirrorTaggings
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'MirrorTaggings')]
16+
final class MirrorTaggings extends Model
17+
{
18+
/**
19+
* The rule list for setting tags.
20+
* @var array<MirrorTagging>|null
21+
*/
22+
#[XmlElement(rename: 'Taggings', type: MirrorTagging::class)]
23+
public ?array $taggings;
24+
25+
/**
26+
* MirrorTaggings constructor.
27+
* @param array<MirrorTagging>|null $taggings The rule list for setting tags.
28+
*/
29+
public function __construct(
30+
?array $taggings = null
31+
)
32+
{
33+
$this->taggings = $taggings;
34+
}
35+
}

src/Models/ReturnHeader.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AlibabaCloud\Oss\V2\Models;
6+
7+
use AlibabaCloud\Oss\V2\Types\Model;
8+
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
9+
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
10+
11+
/**
12+
* Class ReturnHeader
13+
* @package AlibabaCloud\Oss\V2\Models
14+
*/
15+
#[XmlRoot(name: 'ReturnHeader')]
16+
final class ReturnHeader extends Model
17+
{
18+
/**
19+
* The response header.
20+
* @var string|null
21+
*/
22+
#[XmlElement(rename: 'Key', type: 'string')]
23+
public ?string $key;
24+
25+
/**
26+
* The rule for setting response header value for a specific header.
27+
* @var string|null
28+
*/
29+
#[XmlElement(rename: 'Value', type: 'string')]
30+
public ?string $value;
31+
32+
/**
33+
* ReturnHeader constructor.
34+
* @param string|null $key The response header.
35+
* @param string|null $value The rule for setting response header value for a specific header.
36+
*/
37+
public function __construct(
38+
?string $key = null,
39+
?string $value = null
40+
)
41+
{
42+
$this->key = $key;
43+
$this->value = $value;
44+
}
45+
}

src/Models/RoutingRule.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ final class RoutingRule extends Model
3636
#[XmlElement(rename: 'Condition', type: RoutingRuleCondition::class)]
3737
public ?RoutingRuleCondition $condition;
3838

39+
/**
40+
* The Lua script config of this rule.
41+
* @var RoutingRuleLuaConfig|null
42+
*/
43+
#[XmlElement(rename: 'LuaConfig', type: RoutingRuleLuaConfig::class)]
44+
public ?RoutingRuleLuaConfig $luaConfig;
45+
3946
/**
4047
* RoutingRule constructor.
4148
* @param RoutingRuleRedirect|null $redirect The operation to perform after the rule is matched.
@@ -45,11 +52,13 @@ final class RoutingRule extends Model
4552
public function __construct(
4653
?RoutingRuleRedirect $redirect = null,
4754
?int $ruleNumber = null,
48-
?RoutingRuleCondition $condition = null
55+
?RoutingRuleCondition $condition = null,
56+
?RoutingRuleLuaConfig $luaConfig = null,
4957
)
5058
{
5159
$this->redirect = $redirect;
5260
$this->ruleNumber = $ruleNumber;
5361
$this->condition = $condition;
62+
$this->luaConfig = $luaConfig;
5463
}
5564
}

0 commit comments

Comments
 (0)