-
Notifications
You must be signed in to change notification settings - Fork 346
Expand file tree
/
Copy pathAccessPointConfig.php
More file actions
90 lines (76 loc) · 1.99 KB
/
AccessPointConfig.php
File metadata and controls
90 lines (76 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
namespace OSS\Model;
use OSS\Core\OssException;
/**
* Class AccessPointConfig
* @package OSS\Model
*
*/
class AccessPointConfig implements XmlConfig
{
const VPC = 'vpc';
const INTERNET = 'internet';
private $accessPointName;
private $networkOrigin;
private $vpcId;
/**
* AccessPointConfig constructor.
* @param string|null $accessPointName
* @param string|null $networkOrigin
* @param string|null $vpcId
*/
public function __construct($accessPointName=null,$networkOrigin=null,$vpcId=null)
{
$this->accessPointName = $accessPointName;
$this->networkOrigin = $networkOrigin;
$this->vpcId = $vpcId;
}
public function setAccessPointName($accessPointName)
{
$this->accessPointName = $accessPointName;
}
public function setNetworkOrigin($networkOrigin)
{
$this->networkOrigin = $networkOrigin;
}
public function setVpcId($vpcId)
{
$this->vpcId = $vpcId;
}
/**
* Parse TaggingConfig from the xml.
*
* @param string $strXml
* @return null
*/
public function parseFromXml($strXml)
{
}
/**
* Serialize the object into xml string.
*
* @return string
*/
public function serializeToXml()
{
$xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><CreateAccessPointConfiguration></CreateAccessPointConfiguration>');
if (isset($this->accessPointName)){
$xml->addChild('AccessPointName',strval($this->accessPointName));
}
if (isset($this->networkOrigin)){
$xml->addChild('NetworkOrigin',strval($this->networkOrigin));
}
if (isset($this->vpcId)){
$xmlVpc = $xml->addChild('VpcConfiguration');
$xmlVpc->addChild('VpcId',$this->vpcId);
}
return $xml->asXML();
}
/**
* @return string
*/
public function __toString()
{
return $this->serializeToXml();
}
}