Skip to content

Commit f98811d

Browse files
authored
Merge pull request #33 from openprovider/v1beta
Added Domain Token API support (DNS module) Updated DNS, domain, license, and person models to include missing API parameters
2 parents 85bb491 + 8ac2313 commit f98811d

26 files changed

Lines changed: 2414 additions & 57 deletions

src/Dns/Api/DomainTokenApi.php

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

src/Dns/DnsModule.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use GuzzleHttp\ClientInterface;
99
use Openprovider\Api\Rest\Client\Base\Configuration;
1010
use Openprovider\Api\Rest\Client\Base\HeaderSelector;
11+
use Openprovider\Api\Rest\Client\Dns\Api\DomainTokenApi;
1112
use Openprovider\Api\Rest\Client\Dns\Api\NameserverServiceApi;
1213
use Openprovider\Api\Rest\Client\Dns\Api\NsGroupServiceApi;
1314
use Openprovider\Api\Rest\Client\Dns\Api\TemplateServiceApi;
@@ -16,6 +17,9 @@
1617

1718
class DnsModule
1819
{
20+
/** @var DomainTokenApi */
21+
protected $DomainTokenApi;
22+
1923
/** @var NameserverServiceApi */
2024
protected $NameserverServiceApi;
2125

@@ -43,13 +47,23 @@ public function __construct(
4347
HeaderSelector $selector = null,
4448
$host_index = 0
4549
) {
46-
$this->NameserverServiceApi = new NameserverServiceApi($client, $config, $selector, $host_index);
50+
$this->DomainTokenApi = new DomainTokenApi($client, $config, $selector, $host_index);
51+
$this->NameserverServiceApi = new NameserverServiceApi($client, $config, $selector, $host_index);
4752
$this->NsGroupServiceApi = new NsGroupServiceApi($client, $config, $selector, $host_index);
4853
$this->TemplateServiceApi = new TemplateServiceApi($client, $config, $selector, $host_index);
4954
$this->ZoneRecordServiceApi = new ZoneRecordServiceApi($client, $config, $selector, $host_index);
5055
$this->ZoneServiceApi = new ZoneServiceApi($client, $config, $selector, $host_index);
5156
}
5257

58+
/**
59+
* Gets DomainTokenApi api.
60+
* @return DomainTokenApi
61+
*/
62+
public function getDomainTokenApi()
63+
{
64+
return $this->DomainTokenApi;
65+
}
66+
5367
/**
5468
* Gets NameserverServiceApi api.
5569
* @return NameserverServiceApi
Lines changed: 343 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,343 @@
1+
<?php
2+
/**
3+
* DomainTokenCreateTokenRequest
4+
*
5+
* PHP version 5
6+
*
7+
* @category Class
8+
* @package Openprovider\Api\Rest\Client\Dns
9+
* @author OpenAPI Generator team
10+
* @link https://openapi-generator.tech
11+
*/
12+
13+
/**
14+
* DNS
15+
*
16+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17+
*
18+
* The version of the OpenAPI document: 1.0.0-beta
19+
*
20+
* Generated by: https://openapi-generator.tech
21+
* OpenAPI Generator version: 7.2.0
22+
*/
23+
24+
/**
25+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26+
* https://openapi-generator.tech
27+
* Do not edit the class manually.
28+
*/
29+
30+
namespace Openprovider\Api\Rest\Client\Dns\Model;
31+
32+
use \ArrayAccess;
33+
use Openprovider\Api\Rest\Client\Base\ObjectSerializer;
34+
use Openprovider\Api\Rest\Client\Base\ModelInterface;
35+
36+
/**
37+
* DomainTokenCreateTokenRequest Class Doc Comment
38+
*
39+
* @category Class
40+
* @package Openprovider\Api\Rest\Client\Dns
41+
* @author OpenAPI Generator team
42+
* @link https://openapi-generator.tech
43+
*/
44+
class DomainTokenCreateTokenRequest implements ModelInterface, ArrayAccess
45+
{
46+
const DISCRIMINATOR = null;
47+
48+
/**
49+
* The original name of the model.
50+
*
51+
* @var string
52+
*/
53+
protected static $openAPIModelName = 'domain_tokenCreateTokenRequest';
54+
55+
/**
56+
* Array of property to type mappings. Used for (de)serialization
57+
*
58+
* @var string[]
59+
*/
60+
protected static $openAPITypes = [
61+
'domain' => 'string',
62+
'zone_provider' => 'string'
63+
];
64+
65+
/**
66+
* Array of property to format mappings. Used for (de)serialization
67+
*
68+
* @var string[]
69+
*/
70+
protected static $openAPIFormats = [
71+
'domain' => null,
72+
'zone_provider' => null
73+
];
74+
75+
/**
76+
* Array of property to type mappings. Used for (de)serialization
77+
*
78+
* @return array
79+
*/
80+
public static function openAPITypes()
81+
{
82+
return self::$openAPITypes;
83+
}
84+
85+
/**
86+
* Array of property to format mappings. Used for (de)serialization
87+
*
88+
* @return array
89+
*/
90+
public static function openAPIFormats()
91+
{
92+
return self::$openAPIFormats;
93+
}
94+
95+
/**
96+
* Array of attributes where the key is the local name,
97+
* and the value is the original name
98+
*
99+
* @var string[]
100+
*/
101+
protected static $attributeMap = [
102+
'domain' => 'domain',
103+
'zone_provider' => 'zone_provider'
104+
];
105+
106+
/**
107+
* Array of attributes to setter functions (for deserialization of responses)
108+
*
109+
* @var string[]
110+
*/
111+
protected static $setters = [
112+
'domain' => 'setDomain',
113+
'zone_provider' => 'setZoneProvider'
114+
];
115+
116+
/**
117+
* Array of attributes to getter functions (for serialization of requests)
118+
*
119+
* @var string[]
120+
*/
121+
protected static $getters = [
122+
'domain' => 'getDomain',
123+
'zone_provider' => 'getZoneProvider'
124+
];
125+
126+
/**
127+
* Array of attributes where the key is the local name,
128+
* and the value is the original name
129+
*
130+
* @return array
131+
*/
132+
#[\ReturnTypeWillChange]
133+
public static function attributeMap()
134+
{
135+
return self::$attributeMap;
136+
}
137+
138+
/**
139+
* Array of attributes to setter functions (for deserialization of responses)
140+
*
141+
* @return array
142+
*/
143+
#[\ReturnTypeWillChange]
144+
public static function setters()
145+
{
146+
return self::$setters;
147+
}
148+
149+
/**
150+
* Array of attributes to getter functions (for serialization of requests)
151+
*
152+
* @return array
153+
*/
154+
#[\ReturnTypeWillChange]
155+
public static function getters()
156+
{
157+
return self::$getters;
158+
}
159+
160+
/**
161+
* The original name of the model.
162+
*
163+
* @return string
164+
*/
165+
#[\ReturnTypeWillChange]
166+
public function getModelName()
167+
{
168+
return self::$openAPIModelName;
169+
}
170+
171+
172+
173+
174+
175+
/**
176+
* Associative array for storing property values
177+
*
178+
* @var mixed[]
179+
*/
180+
protected $container = [];
181+
182+
/**
183+
* Constructor
184+
*
185+
* @param mixed[] $data Associated array of property values
186+
* initializing the model
187+
*/
188+
public function __construct(array $data = null)
189+
{
190+
$this->container['domain'] = isset($data['domain']) ? $data['domain'] : null;
191+
$this->container['zone_provider'] = isset($data['zone_provider']) ? $data['zone_provider'] : null;
192+
}
193+
194+
/**
195+
* Show all the invalid properties with reasons.
196+
*
197+
* @return array invalid properties with reasons
198+
*/
199+
#[\ReturnTypeWillChange]
200+
public function listInvalidProperties()
201+
{
202+
$invalidProperties = [];
203+
204+
return $invalidProperties;
205+
}
206+
207+
/**
208+
* Validate all the properties in the model
209+
* return true if all passed
210+
*
211+
* @return bool True if all properties are valid
212+
*/
213+
#[\ReturnTypeWillChange]
214+
public function valid()
215+
{
216+
return count($this->listInvalidProperties()) === 0;
217+
}
218+
219+
220+
/**
221+
* Gets domain
222+
*
223+
* @return string|null
224+
*/
225+
#[\ReturnTypeWillChange]
226+
public function getDomain()
227+
{
228+
return $this->container['domain'];
229+
}
230+
231+
/**
232+
* Sets domain
233+
*
234+
* @param string|null $domain domain
235+
*
236+
* @return $this
237+
*/
238+
#[\ReturnTypeWillChange]
239+
public function setDomain($domain)
240+
{
241+
$this->container['domain'] = $domain;
242+
243+
return $this;
244+
}
245+
246+
/**
247+
* Gets zone_provider
248+
*
249+
* @return string|null
250+
*/
251+
#[\ReturnTypeWillChange]
252+
public function getZoneProvider()
253+
{
254+
return $this->container['zone_provider'];
255+
}
256+
257+
/**
258+
* Sets zone_provider
259+
*
260+
* @param string|null $zone_provider zone_provider
261+
*
262+
* @return $this
263+
*/
264+
#[\ReturnTypeWillChange]
265+
public function setZoneProvider($zone_provider)
266+
{
267+
$this->container['zone_provider'] = $zone_provider;
268+
269+
return $this;
270+
}
271+
/**
272+
* Returns true if offset exists. False otherwise.
273+
*
274+
* @param integer $offset Offset
275+
*
276+
* @return boolean
277+
*/
278+
#[\ReturnTypeWillChange]
279+
public function offsetExists($offset)
280+
{
281+
return isset($this->container[$offset]);
282+
}
283+
284+
/**
285+
* Gets offset.
286+
*
287+
* @param integer $offset Offset
288+
*
289+
* @return mixed
290+
*/
291+
#[\ReturnTypeWillChange]
292+
public function offsetGet($offset)
293+
{
294+
return isset($this->container[$offset]) ? $this->container[$offset] : null;
295+
}
296+
297+
/**
298+
* Sets value based on offset.
299+
*
300+
* @param integer $offset Offset
301+
* @param mixed $value Value to be set
302+
*
303+
* @return void
304+
*/
305+
#[\ReturnTypeWillChange]
306+
public function offsetSet($offset, $value)
307+
{
308+
if (is_null($offset)) {
309+
$this->container[] = $value;
310+
} else {
311+
$this->container[$offset] = $value;
312+
}
313+
}
314+
315+
/**
316+
* Unsets offset.
317+
*
318+
* @param integer $offset Offset
319+
*
320+
* @return void
321+
*/
322+
#[\ReturnTypeWillChange]
323+
public function offsetUnset($offset)
324+
{
325+
unset($this->container[$offset]);
326+
}
327+
328+
/**
329+
* Gets the string presentation of the object
330+
*
331+
* @return string
332+
*/
333+
#[\ReturnTypeWillChange]
334+
public function __toString()
335+
{
336+
return json_encode(
337+
ObjectSerializer::sanitizeForSerialization($this),
338+
JSON_PRETTY_PRINT
339+
);
340+
}
341+
}
342+
343+

0 commit comments

Comments
 (0)