@@ 17-126 (lines=110) @@ | ||
14 | * |
|
15 | * @property Api $api |
|
16 | */ |
|
17 | class LoadbalancerHealthmonitor extends OperatorResource implements Creatable, Retrievable, Updateable, Deletable |
|
18 | { |
|
19 | /** |
|
20 | * @var string |
|
21 | */ |
|
22 | public $id; |
|
23 | ||
24 | /** |
|
25 | * @var string |
|
26 | */ |
|
27 | public $tenantId; |
|
28 | ||
29 | /** |
|
30 | * @var string |
|
31 | */ |
|
32 | public $type; |
|
33 | ||
34 | /** |
|
35 | * @var integer |
|
36 | */ |
|
37 | public $delay; |
|
38 | ||
39 | /** |
|
40 | * @var integer |
|
41 | */ |
|
42 | public $timeout; |
|
43 | ||
44 | /** |
|
45 | * @var integer |
|
46 | */ |
|
47 | public $maxRetries; |
|
48 | ||
49 | /** |
|
50 | * @var string |
|
51 | */ |
|
52 | public $httpMethod; |
|
53 | ||
54 | /** |
|
55 | * @var string |
|
56 | */ |
|
57 | public $urlPath; |
|
58 | ||
59 | /** |
|
60 | * @var string |
|
61 | */ |
|
62 | public $expectedCodes; |
|
63 | ||
64 | /** |
|
65 | * @var boolean |
|
66 | */ |
|
67 | public $adminStateUp; |
|
68 | ||
69 | /** |
|
70 | * @var string |
|
71 | */ |
|
72 | public $poolId; |
|
73 | ||
74 | /** |
|
75 | * @var []LoadbalancerPool |
|
76 | */ |
|
77 | public $pools; |
|
78 | ||
79 | protected $resourcesKey = 'healthmonitors'; |
|
80 | protected $resourceKey = 'healthmonitor'; |
|
81 | ||
82 | protected $aliases = [ |
|
83 | 'tenant_id' => 'tenantId', |
|
84 | 'admin_state_up' => 'adminStateUp', |
|
85 | 'max_retries' => 'maxRetries', |
|
86 | 'http_method' => 'httpMethod', |
|
87 | 'url_path' => 'urlPath', |
|
88 | 'expected_codes' => 'expectedCodes', |
|
89 | 'pool_id' => 'poolId' |
|
90 | ]; |
|
91 | ||
92 | /** |
|
93 | * {@inheritDoc} |
|
94 | */ |
|
95 | public function create(array $userOptions): Creatable |
|
96 | { |
|
97 | $response = $this->execute($this->api->postLoadbalancerHealthmonitor(), $userOptions); |
|
98 | return $this->populateFromResponse($response); |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * {@inheritDoc} |
|
103 | */ |
|
104 | public function retrieve() |
|
105 | { |
|
106 | $response = $this->execute($this->api->getLoadbalancerHealthmonitor(), ['id' => (string)$this->id]); |
|
107 | $this->populateFromResponse($response); |
|
108 | } |
|
109 | ||
110 | /** |
|
111 | * {@inheritDoc} |
|
112 | */ |
|
113 | public function update() |
|
114 | { |
|
115 | $response = $this->executeWithState($this->api->putLoadbalancerHealthmonitor()); |
|
116 | $this->populateFromResponse($response); |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * {@inheritDoc} |
|
121 | */ |
|
122 | public function delete() |
|
123 | { |
|
124 | $this->executeWithState($this->api->deleteLoadbalancerHealthmonitor()); |
|
125 | } |
|
126 | } |
|
127 |
@@ 17-120 (lines=104) @@ | ||
14 | * |
|
15 | * @property Api $api |
|
16 | */ |
|
17 | class LoadbalancerListener extends OperatorResource implements Creatable, Retrievable, Updateable, Deletable |
|
18 | { |
|
19 | /** |
|
20 | * @var string |
|
21 | */ |
|
22 | public $name; |
|
23 | ||
24 | /** |
|
25 | * @var string |
|
26 | */ |
|
27 | public $description; |
|
28 | ||
29 | /** |
|
30 | * @var string |
|
31 | */ |
|
32 | public $id; |
|
33 | ||
34 | /** |
|
35 | * @var string |
|
36 | */ |
|
37 | public $tenantId; |
|
38 | ||
39 | /** |
|
40 | * @var string |
|
41 | */ |
|
42 | public $protocol; |
|
43 | ||
44 | /** |
|
45 | * @var integer |
|
46 | */ |
|
47 | public $protocolPort; |
|
48 | ||
49 | /** |
|
50 | * @var integer |
|
51 | */ |
|
52 | public $connectionLimit; |
|
53 | ||
54 | /** |
|
55 | * @var string |
|
56 | */ |
|
57 | public $defaultPoolId; |
|
58 | ||
59 | /** |
|
60 | * @var boolean |
|
61 | */ |
|
62 | public $adminStateUp; |
|
63 | ||
64 | /** |
|
65 | * @var []Loadbalancer |
|
66 | */ |
|
67 | public $loadbalancers; |
|
68 | ||
69 | /** |
|
70 | * @var string |
|
71 | */ |
|
72 | public $loadbalancerId; |
|
73 | ||
74 | protected $resourcesKey = 'listeners'; |
|
75 | protected $resourceKey = 'listener'; |
|
76 | ||
77 | protected $aliases = [ |
|
78 | 'tenant_id' => 'tenantId', |
|
79 | 'admin_state_up' => 'adminStateUp', |
|
80 | 'protocol_port' => 'protocolPort', |
|
81 | 'connection_limit' => 'connectionLimit', |
|
82 | 'default_pool_id' => 'defaultPoolId', |
|
83 | 'loadbalancer_id' => 'loadbalancerId' |
|
84 | ]; |
|
85 | ||
86 | /** |
|
87 | * {@inheritDoc} |
|
88 | */ |
|
89 | public function create(array $userOptions): Creatable |
|
90 | { |
|
91 | $response = $this->execute($this->api->postLoadbalancerListener(), $userOptions); |
|
92 | return $this->populateFromResponse($response); |
|
93 | } |
|
94 | ||
95 | /** |
|
96 | * {@inheritDoc} |
|
97 | */ |
|
98 | public function retrieve() |
|
99 | { |
|
100 | $response = $this->execute($this->api->getLoadbalancerListener(), ['id' => (string)$this->id]); |
|
101 | $this->populateFromResponse($response); |
|
102 | } |
|
103 | ||
104 | /** |
|
105 | * {@inheritDoc} |
|
106 | */ |
|
107 | public function update() |
|
108 | { |
|
109 | $response = $this->executeWithState($this->api->putLoadbalancerListener()); |
|
110 | $this->populateFromResponse($response); |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * {@inheritDoc} |
|
115 | */ |
|
116 | public function delete() |
|
117 | { |
|
118 | $this->executeWithState($this->api->deleteLoadbalancerListener()); |
|
119 | } |
|
120 | } |
|
121 |