Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
28.12% covered (danger)
28.12%
9 / 32
31.58% covered (danger)
31.58%
6 / 19
CRAP
0.00% covered (danger)
0.00%
0 / 1
SDK
28.12% covered (danger)
28.12%
9 / 32
31.58% covered (danger)
31.58%
6 / 19
257.07
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
3
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 swaggerTypes
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 swaggerFormats
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 attributeMap
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setters
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getters
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getModelName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 listInvalidProperties
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
12
 valid
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getPlatform
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setPlatform
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getVersion
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setVersion
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 offsetExists
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 offsetGet
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 offsetSet
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 offsetUnset
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 toPrettyString
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * SDK.
4 *
5 * @category Class
6 *
7 * @author   Swagger Codegen team
8 *
9 * @see     https://github.com/swagger-api/swagger-codegen
10 */
11
12/**
13 * Fingerprint Server API.
14 *
15 * Fingerprint Server API allows you to search, update, and delete identification events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.
16 *
17 * OpenAPI spec version: 3
18 * Contact: support@fingerprint.com
19 * Generated by: https://github.com/swagger-api/swagger-codegen.git
20 * Swagger Codegen version: 3.0.34
21 */
22/**
23 * NOTE: This class is auto generated by the swagger code generator program.
24 * https://github.com/swagger-api/swagger-codegen
25 * Do not edit the class manually.
26 */
27
28namespace Fingerprint\ServerAPI\Model;
29
30use Fingerprint\ServerAPI\ObjectSerializer;
31
32/**
33 * SDK Class Doc Comment.
34 *
35 * @category Class
36 *
37 * @description Contains information about the SDK used to perform the request.
38 *
39 * @author   Swagger Codegen team
40 *
41 * @see     https://github.com/swagger-api/swagger-codegen
42 */
43class SDK implements ModelInterface, \ArrayAccess
44{
45    /**
46     * The original name of the model.
47     *
48     */
49    protected static string $swaggerModelName = 'SDK';
50
51    /**
52     * Array of property to type mappings. Used for (de)serialization.
53     *
54     * @var string[]
55     */
56    protected static array $swaggerTypes = [
57        'platform' => 'string',
58        'version' => 'string'];
59
60    /**
61     * Array of property to format mappings. Used for (de)serialization.
62     *
63     * @var string[]
64     */
65    protected static array $swaggerFormats = [
66        'platform' => null,
67        'version' => null];
68
69    /**
70     * Array of attributes where the key is the local name,
71     * and the value is the original name.
72     *
73     * @var string[]
74     */
75    protected static array $attributeMap = [
76        'platform' => 'platform',
77        'version' => 'version'];
78
79    /**
80     * Array of attributes to setter functions (for deserialization of responses).
81     *
82     * @var string[]
83     */
84    protected static array $setters = [
85        'platform' => 'setPlatform',
86        'version' => 'setVersion'];
87
88    /**
89     * Array of attributes to getter functions (for serialization of requests).
90     *
91     * @var string[]
92     */
93    protected static array $getters = [
94        'platform' => 'getPlatform',
95        'version' => 'getVersion'];
96
97    /**
98     * Associative array for storing property values.
99     *
100     * @var mixed[]
101     */
102    protected array $container = [];
103
104    /**
105     * Constructor.
106     *
107     * @param mixed[] $data Associated array of property values
108     *                      initializing the model
109     */
110    public function __construct(?array $data = null)
111    {
112        $this->container['platform'] = isset($data['platform']) ? $data['platform'] : null;
113        $this->container['version'] = isset($data['version']) ? $data['version'] : null;
114    }
115
116    /**
117     * Gets the string presentation of the object.
118     *
119     */
120    public function __toString(): string
121    {
122        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
123    }
124
125    /**
126     * Array of property to type mappings. Used for (de)serialization.
127     */
128    public static function swaggerTypes(): array
129    {
130        return self::$swaggerTypes;
131    }
132
133    /**
134     * Array of property to format mappings. Used for (de)serialization.
135     */
136    public static function swaggerFormats(): array
137    {
138        return self::$swaggerFormats;
139    }
140
141    /**
142     * Array of attributes where the key is the local name,
143     * and the value is the original name.
144     */
145    public static function attributeMap(): array
146    {
147        return self::$attributeMap;
148    }
149
150    /**
151     * Array of attributes to setter functions (for deserialization of responses).
152     */
153    public static function setters(): array
154    {
155        return self::$setters;
156    }
157
158    /**
159     * Array of attributes to getter functions (for serialization of requests).
160     */
161    public static function getters(): array
162    {
163        return self::$getters;
164    }
165
166    /**
167     * The original name of the model.
168     */
169    public function getModelName(): string
170    {
171        return self::$swaggerModelName;
172    }
173
174    /**
175     * Show all the invalid properties with reasons.
176     *
177     * @return array invalid properties with reasons
178     */
179    public function listInvalidProperties(): array
180    {
181        $invalidProperties = [];
182
183        if (null === $this->container['platform']) {
184            $invalidProperties[] = "'platform' can't be null";
185        }
186        if (null === $this->container['version']) {
187            $invalidProperties[] = "'version' can't be null";
188        }
189
190        return $invalidProperties;
191    }
192
193    /**
194     * Validate all the properties in the model
195     * return true if all passed.
196     *
197     * @return bool True if all properties are valid
198     */
199    public function valid(): bool
200    {
201        return 0 === count($this->listInvalidProperties());
202    }
203
204    /**
205     * Gets platform.
206     */
207    public function getPlatform(): string
208    {
209        return $this->container['platform'];
210    }
211
212    /**
213     * Sets platform.
214     *
215     * @param string $platform platform of the SDK
216     *
217     * @return $this
218     */
219    public function setPlatform(string $platform): self
220    {
221        $this->container['platform'] = $platform;
222
223        return $this;
224    }
225
226    /**
227     * Gets version.
228     */
229    public function getVersion(): string
230    {
231        return $this->container['version'];
232    }
233
234    /**
235     * Sets version.
236     *
237     * @param string $version SDK version string
238     *
239     * @return $this
240     */
241    public function setVersion(string $version): self
242    {
243        $this->container['version'] = $version;
244
245        return $this;
246    }
247
248    /**
249     * Returns true if offset exists. False otherwise.
250     *
251     * @param int $offset Offset
252     */
253    public function offsetExists($offset): bool
254    {
255        return isset($this->container[$offset]);
256    }
257
258    /**
259     * Gets offset.
260     *
261     * @param int $offset Offset
262     */
263    public function offsetGet($offset): mixed
264    {
265        return isset($this->container[$offset]) ? $this->container[$offset] : null;
266    }
267
268    /**
269     * Sets value based on offset.
270     *
271     * @param int   $offset Offset
272     * @param mixed $value  Value to be set
273     */
274    public function offsetSet($offset, mixed $value): void
275    {
276        if (is_null($offset)) {
277            $this->container[] = $value;
278        } else {
279            $this->container[$offset] = $value;
280        }
281    }
282
283    /**
284     * Unsets offset.
285     *
286     * @param int $offset Offset
287     */
288    public function offsetUnset($offset): void
289    {
290        unset($this->container[$offset]);
291    }
292
293    /**
294     * Gets the string presentation of the object in a pretty JSON format.
295     *
296     */
297    public function toPrettyString(): string
298    {
299        return json_encode(
300            ObjectSerializer::sanitizeForSerialization($this),
301            JSON_PRETTY_PRINT
302        );
303    }
304}